摘要: 例题2-1 aabb 输出所有形如aabb的4位完全平方数(即前两位数字相等,后两位数字也相等)。 代码: #include <stdio.h> int main() { for (int x = 1;; x++) { int n = x * x; if (n < 1000) { continue; 阅读全文
posted @ 2020-08-12 14:41 Techoc 阅读(94) 评论(0) 推荐(0) 编辑
摘要: 习题1-1 平均数 输入3个整数,输出它们的平均数,保留3为小数 代码: #include <stdio.h> int main() { double a, b, c; scanf("%lf%lf%lf", &a, &b, &c); printf("%.3f", (a + b + c) / 3); 阅读全文
posted @ 2020-08-12 11:43 Techoc 阅读(161) 评论(0) 推荐(0) 编辑