题目一:计算两个班的人数
#include<stdio.h>
int main()
{
int firstNum=54;
int secondNum=52;
printf("firstNum+secondNum=%d",54+52);
return 0;
}
题目二:取余运算
#include<stdio.h>
int main()
{
int firstNum=54;
printf("firstNum/4=%d",54/4);
return 0;
}
题目三:求差值
#include<stdio.h>
int main()
{
int firstNum=54;
int secondNum=52;
printf("firstNum-secondNum=%d",54-52);
return 0;
}
题目四:输入操作
#include <stdio.h>
int main()
{
int firstNum=0;
int secondNum=0;
int total=0.0;
printf ("请输入一班的人数:\n");
scanf ("%d",& firstNum);
printf ("请输入二班的人数:\n");
scanf ("%d",& secondNum);
printf ("该专业的总人数为:%d\n",total);
return 0;
}