c 题集1_填空(C question sets 1_ fill in the blanks).docVIP

  • 3
  • 0
  • 约7.08千字
  • 约 24页
  • 2017-08-16 发布于河南
  • 举报

c 题集1_填空(C question sets 1_ fill in the blanks).doc

c 题集1_填空(C question sets 1_ fill in the blanks)

c 题集1_填空(C question sets 1_ fill in the blanks) C set 2_ rare treasure: Rand | Land Rover my message (0/3) | space | Baidu home page | Baidu space | my exit Thin treasure: where are you from, my friend, you are like a butterfly flying into my window! The home page blog album | profile view articles C question set 22007-06-29 21:24 topic: Receive 20 integers from the keyboard, count the number of positive numbers, and the sum of all positive numbers. #include stdio.h (main) {int, I, a[20], count; Long sun=0; For (i=0; i20; i++) Scanf (%d, ___); /*$BLANK1$*/ Count=___; /*$BLANK2$*/ For (i=0; i20; i++) {if (a[i]0) {sun+=a[i]; ___; /*$BLANK3$*/ } } Printf (%d, %ld, count, sun); } 1:, a[i], or a+i 2: 0 3:, count++, or count=count+1 Subject: Output the following figures (no spaces between numbers, no spaces before each line first) 0001000 0011100 0111110 One million one hundred and eleven thousand one hundred and eleven 0111110 0011100 0001000 Procedures are as follows: #include math.h (main) { Int, I, j; For (i=-3; i=3; i++) { J=1; While (j__abs (I)) /*$BLANK1$*/ {printf (0); j++;} J=1; While (j__7-2*abs (I)) /*$BLANK2$*/ {printf (1); j++;} J=1; While (j__) /*$BLANK3$*/ {printf (0); j++;} Printf (\n); } } = 1: = 2: 3: =abs (I) Subject: The following program enters a line of characters (enter at the end of the carriage), and then changes all of the charactersbto charactersf. #includestdio.h #includestring.h Main () {char s[80]; Int i; Gets (s); ___ /*$BLANK1$*/ While (s[i] /*$BLANK2$*/ =___!) {if (s[i]==,b) S[i]=f; ___ /*$BLANK3$*/ } Printf (%s\n, s); } 1: i=0; 2:\0 3: i++; Subject: The following procedures will record the number of students who failed and count the students who failed. Please fill in the blanks. (Num domains represent student numbers, name domains represent names, and score domains represent grades) Struct stu {int num; Char name[12]; Float score; }; Main () {___stud[5]={, {101, Li, Ping, 45}, /*$BLANK1$*/ {102, Zhang Ping, 62.5}, {103, He Fang, 92.5},

您可能关注的文档

文档评论(0)

1亿VIP精品文档

相关文档