#include <stdio.h>
int main() {
int age1, age2, result;
/* scanf()는 입력받을 때까지 다음 줄로 가지 않음. 그럼으로 위의 줄과 변경하면 원하는 결과를 얻을수 없음*/
scanf("%d%d", &age1, &age2);
printf("input your age and friend age\n");
*/
printf("input your age and friend age\n");
scanf("%d%d", &age1, &age2); //입력을 2개를 받아야 scanf가 종료되고 다음줄이 실행됨
result = age1+age2;
printf("you and friend age sum is %d", result);
return 0;
}
To embed this project on your website, copy the following code and paste it into your website's HTML: