123456789101112131415161718//그냥 구조체 선언 struct person{ char name[10];//문자배열로된이름 int age;//나이를나타내는정수값 float height;//키를나타내는실수값};struct person a;//구조체변수선언 //typedef를 사용한 구조체 선언typedef struct person{ char name[10];//문자배열로된이름 int age;//나이를나타내는정수값 float height;//키를나타내는실수값}person;person a;//구조체변수선언cs
삼향연산자를 이용하여 만들어봤습니다. 123456789101112131415161718192021#include int main(void){ while(1){ int x, y, z; printf("input x : "); scanf_s("%d",&x); printf("input y : "); scanf_s("%d", &y); printf("input z : "); scanf_s("%d", &z); printf("\n"); (x > y) ? (x > z) ? printf("%d",x) : printf("%d", z) : (y > z) ? printf("%d",y) : printf("%d",z); printf("\n ------------------------------------------- \n"); }..
깃허브 에서도 보실 수 있습니다. 분류는 C이지만 정작 확장자를 .c 로해두면 안돌아가는건 안비밀(.cpp로 해둬야 돌아갑니다.) 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990#include void top(int n) { for (int j = 0; j