摘要: #include<stdio.h> #include<math.h> int main() { //// 输入50个学生的成绩 // int i = 1; // float aver; // float score1,score2,score3,score4,score5; // while (i 阅读全文
posted @ 2021-08-19 17:33 tbbb1 阅读(62) 评论(0) 推荐(0)
摘要: #include<stdio.h> #include<math.h> int main() { //输入一个数,要求输出其绝对值; float x; printf("请输入一个数字:"); scanf_s("%f", &x); printf("%2.2f的绝对值是 ", x); if (x >= 0 阅读全文
posted @ 2021-08-19 17:14 tbbb1 阅读(151) 评论(0) 推荐(0)
摘要: #include<stdio.h> #include<math.h> #define PI 3.14; // 顺序程序设计 int main() { // 书p37 1. 温度的摄氏表示法和华氏表示法的转换 // 关键:转换公式: c=5/9(f-32) // ① float st, ht; ht 阅读全文
posted @ 2021-08-19 17:06 tbbb1 阅读(216) 评论(0) 推荐(0)
摘要: #include<stdio.h> #include<math.h> int main() { // 第2章 算法 // 2.1. 书p17: 求1*2*3*4*5 //int bc, c; //int ji; //for (bc = 1; bc < 5; bc++) // c = bc + 1; 阅读全文
posted @ 2021-08-19 17:00 tbbb1 阅读(60) 评论(0) 推荐(0)
摘要: 谭浩强-C语言-第一章 #include<stdio.h> int main(void) { // 1. printf("**********************\n\n"); printf(" Hello World!\n\n"); printf("**********************\n"); // 2.1 阅读全文
posted @ 2021-08-19 16:48 tbbb1 阅读(73) 评论(0) 推荐(0)