#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==0||i==high-1)
cout<<"*";
else {
if(j==0||j==width-1){
cout<<"*";
} else {
cout<<" ";
}
}
}
cout<<endl;
}
}
int main(int argc, char *argv[])
{
printStar2();
system("PAUSE");
return EXIT_SUCCESS;
}
打印矩形
最新推荐文章于 2023-02-12 13:50:47 发布