ECNU2021年程序设计与c语言
水佑
这个作者很懒,什么都没留下…
展开
-
E. square root
原问题单点时限:2.0 sec内存限制:512 MBWrite 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.样例input120output10.954451input100output10.000000input..原创 2021-09-22 19:46:37 · 172 阅读 · 1 评论 -
D. A+B Problem
原问题单点时限:2.0 sec内存限制:256 MBGiven (a, b), output (a + b).样例input1 2output3分析与代码小学数学题#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 · 56 阅读 · 0 评论 -
C. 最大数
原问题单点时限:2.0 sec内存限制:256 MBModify 21Lab01_02.c to print the maximum of three integers inputted.输入格式输入 3 个整数输出格式输出最大数样例input10 9 8outputEnter a,b and c:Max=10分析与代码依旧没什么好说的#include <stdio.h>int main(void){ int..原创 2021-09-22 19:36:41 · 98 阅读 · 0 评论 -
B. 较大数
原问题B. 较大数单点时限:1.0 sec内存限制:256 MBRun a simple example on p40 of 21C_Chapter1.ppt.输入格式Two integers.输出格式Output.样例input46 19outputEnter a and b:Max=46分析与代码依旧没有什么好说的,比较二者大小,用简单的if就可以了。#include <stdio.h>int mai...原创 2021-09-22 19:27:54 · 107 阅读 · 0 评论 -
A. Output a string
原问题单点时限:2.0 sec内存限制:256 MBWrite 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 · 60 阅读 · 0 评论