#include <cstdlib>
#include <iostream>
#include<stdlib.h>
#include<stdio.h>
using namespace std;
void printStar2(){
int i=0;
int j=0;
int high =10;
int width =10;
for(i=0;i<high;i++){
for(j=0;j<width;j++){
if(i%2==0){
if(j!=width-1){
cout<<" *";
} else {
cout<<" ";
}
} else {
if(j==0){
cout<<" ";
} else {
cout<<" *";
}
}
}
cout<<endl;
}
}
int main(int argc, char *argv[])
{
printStar2();
system("PAUSE");
return EXIT_SUCCESS;
}
c程序设计课后习题p39 2.27
最新推荐文章于 2022-05-16 02:20:48 发布