#include<iostream>
#include<fstream>
#include<cstdlib>//
#include<string>
#include<cctype>
using namespace std;
int hcount=1;
void showstr(char *str,int n=0);
void showstr(char *str,int n)
{
if(n!=0)
{
for(int i=0;i<hcount;i++)
cout<<str<<endl;
}
else
cout<<str<<endl;
hcount++;
}
void main()
{
showstr("hello world");
cout<<endl;
showstr("hello world",1);
cout<<endl;
showstr("hello world",1);
cout<<endl;
showstr("hello world",0);
}
C++primer plus第六版课后编程练习答案8.1
最新推荐文章于 2018-08-03 15:19:36 发布