23 lines
304 B
C++
23 lines
304 B
C++
//直角三角形
|
|
#include<iostream>
|
|
#include<string>
|
|
|
|
using namespace std;
|
|
|
|
int main(){
|
|
int n;
|
|
cin >>n;
|
|
string xin = "*";
|
|
|
|
for (int i = 1; i <= n; i++)
|
|
{
|
|
for (int j = 1; j <= i; ++j)
|
|
{
|
|
cout <<xin;
|
|
}
|
|
cout <<endl;
|
|
}
|
|
|
|
return 0;
|
|
}
|