- 3
- 0
- 约7.08千字
- 约 24页
- 2017-08-16 发布于河南
- 举报
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},
您可能关注的文档
- 2014英国剑桥大学申请条件介绍(2014 University of Cambridge introduced the application conditions).doc
- 2015国考行测判断推理每日一练(11.1)(In the 2015 test line test judgment practice a day (11.1)).doc
- 2015年北京大学汇丰商学院考研必看经验.doc
- 2013货币政策稳中有进(2013 monetary policy steady progress).doc
- 2015年南开大学翻译硕士专业mti考研复习大纲(2015 Nankai University master of translation professional MTI review outline).doc
- 2015年普通高等学校招生全国统一考试(四川卷)考试说明及题型示例(历史)(In 2015, the unified national college entrance examination (Sichuan volume) instructions and sample questions (History)).doc
- 2015年最流行的男孩女孩英文名字推荐大全(Boys and girls in 2015 the most popular English recommended name Daquan).doc
- 2015高考物理一轮复习课时跟踪检测(十二)牛顿运动定律的综合应用(二)试题及完整解析答案-39 - 副本(2015 college entrance examination physics a review class tracking detection (twelve) comprehensive application of Newton's law of motion (two) questions and.doc
- 2014期末(At the end of 2014).doc
- 20种ps技术(20 kinds of PS Technology).doc
原创力文档

文档评论(0)