码迷,mamicode.com
首页 > 其他好文 > 详细

自考新教材-p294

时间:2020-01-27 17:19:07      阅读:70      评论:0      收藏:0      [点我收藏+]

标签:ios   mes   运行   out   没有   http   names   源程序   info   

源程序:

#include<iostream>

using namespace std;

int main()

{

char str[30];

while (!cin.eof())          //当输入流没有结束时继续循环

{

cin.ignore(10, ‘:‘);    //在cin流中跳过‘:‘之前的全部字符

if (!cin.eof())         //输入流若没有结束

{

cin >> str;          //输入电话号码

cout << str << endl;

}

}

system("pause");

return 0;

}

 运行结果:

技术图片

自考新教材-p294

标签:ios   mes   运行   out   没有   http   names   源程序   info   

原文地址:https://www.cnblogs.com/duanqibo/p/12236110.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!