第一次c语言题(国外英文资料).docVIP

  • 10
  • 0
  • 约1.22万字
  • 约 28页
  • 2017-06-08 发布于河南
  • 举报
第一次c语言题(国外英文资料)

第一次c语言题(国外英文资料) A Description Xiao_ming has two brothers, brother brother called Da_min, called Er_min. When the three brothers came home from school, their parents greeted them. Input nothing Output Please output: Hello Da_min, Hello Er_min, Hello Xiao_ming! Sample Input Sample Output Hello Da_min, Hello Er_min, Hello Xiao_ming! #includestdio.h Int, main () { Printf (Hello Da_min, \n); Printf (Hello Er_min, \n); Printf (Hello Xiao_ming, \n); } Problem B: arithmetic basic operations Time limit: 1 Sec? Memory limit: 2 MB Submission: 1621? Settlement: 400 [[] [] to discuss the state submitted version] Title Description Calculate the sum of two integers x and Y (0x, y1000), sum, difference, product, quotient, remainder, x, square, and y of the three. input Enter only one line, see sample for formatting. output Output for multiple lines, in line with each row output x, y, sum, difference, product, quotient, remainder, x square and Y three times, format see sample sample input X = 11, y = 3 sample output X + Y: 14 X - Y: 8 X * y: 33 X / Y quotient: 3, remainder: 2 X ^ 2: 121 Y ^ 3:27 Prompt Pay attention to the input output format. To understand the features of the C language, integer division operator, and the operator has no power. #includestdio.h Int, main () { Int, x, y; Scanf (x =%d, y =%d, x, y); Printf (x + Y:%d\n, x+y); Printf (X - Y:%d\n, X-Y); Printf (x * y:%d\n, x*y); Printf (x / y,%d, remainder:,%d\n, x/y, x%y, quotient:); Printf (x ^ 2:%d\n, x*x); Printf (Y ^ 3:%d\n, y*y*y); } Problem C: find the area and perimeter of a circle Time limit: 1 Sec? Memory limit: 2 MB Submission: 1177? Settlement: 464 [[] [] to discuss the state submitted version] Title Description From the keyboard input of the radius of the circle, and the circle area and perimeter, PI 3.14. input Enter a float data, and the valid digit will not exceed the decimal 6 bit. output The output is two lines. First, the area of the action circle, the perimeter of the second behavior circle, the forma

文档评论(0)

1亿VIP精品文档

相关文档