#include
using namespace std;
int main(){
int n,i;
for( n=0; n<5; n++){
for( i=4; i>=0; i–){
if(i<=n){
cout<<"*";
}else{
cout<<" ";
}
}
cout<<endl;
}
return 0;
}
打印直角三角形(朝右)
最新推荐文章于 2023-04-05 23:54:06 发布
#include
using namespace std;
int main(){
int n,i;
for( n=0; n<5; n++){
for( i=4; i>=0; i–){
if(i<=n){
cout<<"*";
}else{
cout<<" ";
}
}
cout<<endl;
}
return 0;
}