#include <stdio.h>
int main() {
printf("Apple\nBanana\nCherry\n");
printf("'Hello'\n");
printf("\"Hello World\"\n");
printf("\n\n");
//변수선언
int a;
int b;
a = 50;
b = 100;
printf("a의 값은 %d 입니다\n", a);
printf("a의 값은 %d 입니다. b의 값은 %d입니다\n" , a, b);
printf("\n\n");
int n1;
int n2;
n1 =5;
n2 =12;
printf("n1=%d\n", n1);
printf("n2=%d\n", n2);
printf("\n\n");
float a1 = 1.3;
printf("a1는 %f 입니다.\n", a1);
printf("a1는 %.2f 입니다.\n", a1);
printf("a1는 %.4f 입니다.\n", a1);
printf("\n\n");
float b1 = 1.345;
printf("b1는 %.1f 입니다.\n", b1);
printf("b1는 %.2f 입니다.\n", b1);
printf("b1는 %.3f 입니다.\n", b1);
float n3 = -5.06;
float n4 = 12.345;
printf("n3 = %.2f\n",n3);
printf("n4 = %.3f\n",n4);
float f1 = 9.99;
int f2 = 3;
printf("f1 = %.2f\n", f1);
printf("f2 = %d\n", f2);
printf("\n\n");
int n;
scanf("%d", &n);
printf("%d\n", n);
printf("\n\n");
float f4;
scanf("%f", &f4);
printf("%f\n", f4);
printf("\n\n");
int m5, m6;
scanf("%d %d\n", &m5, &m6);
printf("%d %d\n", m5, m6);
printf("\n\n");
int n5, n6;
scanf("%d %d\n", &n6, &n5);
printf("%d %d\n", n5, n6);
printf("\n\n");
return 0;
}
To embed this project on your website, copy the following code and paste it into your website's HTML: