#include<iostream> #include<cstdlib> using namespace std; int main() { int n,i,r,v; cin>>n; for(i=1;i<=n;i++) { v=n-i; for(r=1;r<=v;r++) { cout<<"_"; } for(r=1;r<=i;r++) { cout<<"*"; } cout<<endl; } }
#include<iostream>
#include<cstdlib>
using namespace std;
int main()
{
int n,i,r,v;
cin>>n;
for(i=1;i<=n;i++)
v=n-i;
for(r=1;r<=v;r++)
cout<<"_";
}
for(r=1;r<=i;r++)
cout<<"*";
cout<<endl;