Recent Posts
printf("ho_tari\n");
average 본문
#include <stdio.h>
int main(void)
{
int a, b, c;
printf("Korean: ");
scanf("%d", &a);
printf("English: ");
scanf("%d", &b);
printf("Math: ");
scanf("%d", &c);
int sum;
double average;
sum = a + b + c;
average = sum / 3.0;
printf("-----------------------\n");
printf("Sum: %d\nAverage: %.2f\n", sum, average);
return 0;
}
<compile 결과>
'C' 카테고리의 다른 글
bigLetter (0) | 2023.08.31 |
---|---|
baseball game (0) | 2023.08.31 |
arrayCompare (0) | 2023.08.31 |
arrayAssignment (0) | 2023.08.31 |
arithmetic (0) | 2023.08.31 |