ECNU2021年程序设计与c语言
水佑
这个作者很懒,什么都没留下…
展开
-
E. square root
原问题 单点时限:2.0 sec 内存限制:512 MB Write a program to input an integer n, and to output square root of n with format %f. 输入格式 input an integer n. 输出格式 output square root of n. 样例 input 120 output 10.954451 input 100 output 10.000000 input..原创 2021-09-22 19:46:37 · 115 阅读 · 1 评论 -
D. A+B Problem
原问题 单点时限:2.0 sec 内存限制:256 MB Given (a, b), output (a + b). 样例 input 1 2 output 3 分析与代码 小学数学题 #include <stdio.h> int main(void) { int a, b, sum; scanf("%d %d", &a, &b); sum = a + b; printf("%d", sum); ..原创 2021-09-22 19:41:01 · 47 阅读 · 0 评论 -
C. 最大数
原问题 单点时限:2.0 sec 内存限制:256 MB Modify 21Lab01_02.c to print the maximum of three integers inputted. 输入格式 输入 3 个整数 输出格式 输出最大数 样例 input 10 9 8 output Enter a,b and c:Max=10 分析与代码 依旧没什么好说的 #include <stdio.h> int main(void) { int..原创 2021-09-22 19:36:41 · 88 阅读 · 0 评论 -
B. 较大数
原问题 B. 较大数 单点时限:1.0 sec 内存限制:256 MB Run a simple example on p40 of 21C_Chapter1.ppt. 输入格式 Two integers. 输出格式 Output. 样例 input 46 19 output Enter a and b: Max=46 分析与代码 依旧没有什么好说的,比较二者大小,用简单的if就可以了。 #include <stdio.h> int mai...原创 2021-09-22 19:27:54 · 78 阅读 · 0 评论 -
A. Output a string
原问题 单点时限:2.0 sec 内存限制:256 MB Write a program to displayHello, class 2025 CSECNU!in one line. 分析与代码 这个没啥好说的 #include <stdio.h> int main(void) { printf("Hello, class 2025 CSECNU!\n"); return 0; } 结果 case 0 ...原创 2021-09-22 19:22:04 · 53 阅读 · 0 评论