复习题很轻松的通过了,不赘述了。
最近工作开始忙了,第七章看的效果很慢,但是兴趣还在上了24小时的班之后居然能兴致勃勃的写代码,当做休息吧。
瞎扯结束,以上。
编程练习
1.
/很简单,看会书上例题就可以。/
#include
2.
#include <stdio.h>
int main(void)
{
char ch;
int n;
for( n = 1;ch = getchar() != '#';n++)
{
printf("%c %d", ch, ch);
if(n%8==0)
printf("\n");
}
return 0;
}
3.
#include <stdio.h>
int main(void)
{
int a = 0, b = 0, c = 0, d = 0, i;
printf("Please enter the number:\n");
while(1)
{
scanf("%d", & i);
if(i == 0)
break;
if(i%2==0)
{
a++;
b += i;
}
else
{
c+