행복한 프로그래밍
mozart family
hacking sorcerer
2018. 2. 26. 21:35
728x90
반응형
#include <stdio.h>
#include <string.h>
#define KIDS 3
#define FAMILY "The Peytons"
#define MORTGAGE_RATE 5.15
main()
{
int age;
char childname[14] = "Thomas";
printf("\n%s는 %d명의 아이를 가지고 있다. \n", FAMILY, KIDS);
age = 11;
printf("첫 번째 아이 %s는 %d살입니다.\n", childname, age);
strcpy(childename, "Christopher");
age = 6;
printf("두 번째 아이 %s는 %d살입니다.\n", childename, age);
strcpy(childename, "Benjamin");
age = 3;
printf("세 번째 아이 %s는 %d살입니다. \n", childename, age);
return 0;
}
728x90
반응형