搜索
编程论坛
→
开发语言
→
『 C语言论坛 』
→ 这些期末题目,求大神们帮忙 C语言的
标题:
这些期末题目,求大神们帮忙 C语言的
只看楼主
HUANG126
等 级:
新手上路
帖 子:9
专家分:0
注 册:2016-12-24
第
11
楼
得分:0
回复 10楼 bjut_Allen
谢谢
2016-12-24 15:49
HUANG126
等 级:
新手上路
帖 子:9
专家分:0
注 册:2016-12-24
第
12
楼
得分:0
回复 10楼 bjut_Allen
谢谢啊
2016-12-24 15:50
HUANG126
等 级:
新手上路
帖 子:9
专家分:0
注 册:2016-12-24
第
13
楼
得分:0
回复 10楼 bjut_Allen
#include <stdio.h>
main()
{
int iCountRow;
char ch;
iCountRow= 0;
while((ch = getchar()) != '\n')
if(ch == '\n')
++iCountRow;
printf("行数为:%d\n", iCountRow);
}26、 设计程序,从键盘上输入一串字符,统计该字符串的行数,输入字符@表示结束。
这样的还需要再加点什么???
2016-12-24 15:57
bjut_Allen
来 自:平乐园工业技术学校
等 级:
蜘蛛侠
威 望:
8
帖 子:323
专家分:1223
注 册:2016-10-16
第
14
楼
得分:0
回复 13楼 HUANG126
#include <stdio.h>
int main()
{
int iCountRow;
char ch;
iCountRow= 0;
while((ch = getchar()) != '@'){
if(ch == '\n')
++iCountRow;
}
printf("行数为:%d\n", iCountRow);
return 0;
}
Code is my life.
2016-12-24 17:06
14
2/2页
1
2
参与讨论请移步原网站贴子:
https://bbs.bccn.net/thread-472871-1-1.html
关于我们
|
广告合作
|
编程中国
|
清除Cookies
|
TOP
|
手机版
编程中国
版权所有,并保留所有权利。
Powered by
Discuz
, Processed in 1.337002 second(s), 8 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved