![]() |
#2
pangding2011-03-15 22:58
|
*********
* *
* *
* *
* *
* *
* *
* *
*********

#include<iostream>
using namespace std;
char A[]="*********";
int main ()
{
for (int i=0; i<=9; i++)
{
cout<<A[i];
}cout<<endl;
for (int j=0; j<=7; j++)
{
cout<<A[j]<<" "<<A[j]<<endl;
}
for (int f=0; f<=8; f++)
{
cout<<A[f];
}
return 0;
}
求不用for的程序....... using namespace std;
char A[]="*********";
int main ()
{
for (int i=0; i<=9; i++)
{
cout<<A[i];
}cout<<endl;
for (int j=0; j<=7; j++)
{
cout<<A[j]<<" "<<A[j]<<endl;
}
for (int f=0; f<=8; f++)
{
cout<<A[f];
}
return 0;
}