- 博客(10)
- 收藏
- 关注
原创 #C语言[Basic I/O] The root of the equation
Description从键盘读入三个数a, b, c,输出方程的两个实根。Input三个数a,b,c, 保证方程为一元二次方程,且一定有两个实根。Outpt方程的两个实根,小根在前,大根在后, 结果保留到小数点后三位。Sample Input1 -4 3Sample Output1.000 3.000Hint求平方根可用<math.h>中的sqrt函数Programme...
2021-04-15 21:46:32 220
原创 #C语言[Basic I/O] Length of different numeric data type
DescriptionDifferent numeric data types have different lengh of bits. In this test, you should write a program that outputs the length of these data types.InputNO inputOutputThe output of the program should in order. Specifically, you should output th
2021-04-15 21:43:53 93
原创 #C语言[Basic I/O] Simple Input and Output
DescriptionPlease wirte a program to read integers from the keyboard and print out them. Each number is in the scope of the int type.InputThe input contains two lines. The first line is a number that indicates how much numbers to be read. Then the numbe
2021-04-15 21:41:02 188 1
原创 #C语言[Basic I/O] scanf and printf
Description编写一个程序,使用输入函数scanf, 从键盘按顺序输入下列数据,再用printf将输入数据原样打印在屏幕上(数据间用空格隔开)。注意数据的类型和scanf/printf 函数的格式指定方法。输入:a 100 450.34 2147483648 4294967296 126.3455568输出:a 100 450.34 2147483648 4294967296 126.3455568Input输入数据只有一行,共有6个变量。Output输出数据独占一行(即最后要加换
2021-04-15 21:37:16 263
原创 #C语言[Basic I/O] Converting feet into meters
DescriptionWrite a program that reads a number in feet, converts it to meters.One foot is 0.305 meters.InputA num in float represent the feets.OutputThe converted meters in one line.Sample Input1000Sample Output305HintThe formatted output is fi
2021-04-15 21:34:06 126
原创 #C语言[Basic I/O] 大写字母转小写字母
Description输入任意大写字母,输出该字母对应的小写字母Input任意大写字母Output对应的小写字母(注:以换行结束)Sample InputASample OutputaProgramme
2021-04-15 21:31:21 122
原创 #C语言[Basic I/O] parallelogram
Description读入一个字符,并用它输出一个平行四边形。input一个字符output一个大小为4的平行四边形,平行四边形每一行的开头会有0个或多个空格。Sample Input#Sample Output #### #### ########Programme...
2021-04-15 21:14:10 137
原创 #C语言[Basic I/O] Sum the digits in an integer
读取一个三位整数并将其百位、十位、个位上的数加总并输出结果(用到%取余)DescriptionWrite a program that reads an integer with 3 digits and adds all the digits in the integer.For example,if an integer is 932,the sum of all its digits is 9+3+2=14.InputAn integer x.(100<=x<=999)Outpu
2021-04-15 21:05:11 247
原创 #C语言[Basic I/O] A-B
Description输入两个整数A和B,输出这两个整数的差A-B。Input输入只有一行,该行只有两个整数,分别对应A和B,它们之间用一个空格分开。其中,A、B的取值范围为: -1000 <= A <=1000 , -1000 <= B <= 1000。Output输出独占一行,该行只有一个整数,它正好是A-B的值(注意,其后面需要加一个换行符)。Sample Input2 1Sample Output1Programme...
2021-04-15 20:57:49 1078
原创 #C语言[Basic I/O] Polynominal I
给定两对整数,计算出(a1x+b1)(a2x+b2)?DescriptionGiven two pair of integers (a1,b1) and (a2,b2),can you calculate the expanded form of (a1x+b1)(a2x+b2)?(note that we use “x^2” to express xx and omit “”)InputTwo line, each line contains a pair of integers ai and
2021-04-15 20:42:29 168
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人