摘要:
1.定义圆的半径,求面积 int r=5; double Π=3.14; System.out.println("圆的面积为"+Π*(r*r)); 2.华氏温度和摄氏温度互相转换,从华氏度变成摄氏度你只要减去32,乘以5在除以9就行了;将摄氏度转成华氏度,直接乘以9,除以5,再加上32就行 int 阅读全文
摘要:
1.猜数字,如果大了提示大了点,小了提示小了点 #include<stdio.h> #include <stdlib.h> #include <time.h> int main() { while(1){ int a=0,b; srand((unsigned)time(NULL)); a = ran 阅读全文
摘要:
编写程序,判断学生的成绩是什么等级 #include<stdio.h> main(){ int score; printf("输入学生的分数\n"); scanf("%d",&score); switch(score/10) { case 10:printf("A\n");break; case 9 阅读全文