더하기
#include <stdio.h>
int main()
{
int input1 = 0, input2 = 0;
scanf_s("%d", &input1);
scanf_s("%d", &input2);
printf("%d\n", input1 + input2);
return 0;
}
빼기
#include <stdio.h>
int main()
{
int input1 = 0, input2 = 0;
scanf_s("%d", &input1);
scanf_s("%d", &input2);
printf("%d\n", input1 - input2);
return 0;
}
곱하기
#include <stdio.h>
int main()
{
int input1 = 0, input2 = 0;
scanf_s("%d", &input1);
scanf_s("%d", &input2);
printf("%d\n", input1 * input2);
return 0;
}
나누기
#include <stdio.h>
int main()
{
int input1 = 0, input2 = 0;
scanf_s("%d", &input1);
scanf_s("%d", &input2);
printf("%d\n", input1 / input2);
return 0;
}
나누기(나머지)
#include <stdio.h>
int main()
{
int input1 = 0, input2 = 0;
scanf_s("%d", &input1);
scanf_s("%d", &input2);
printf("%d\n", input1 % input2);
return 0;
}