Untitled
unknown
plain_text
a year ago
436 B
3
Indexable
#include <iostream>
using namespace std;
int main() {
int r, i, j, h;
cout<<"Vendos numrin e rrjeshtave: ";
cin >> r;
for(i = 1; i <= r; i++)
{
for(h = i; h < r; h++){
cout<<" ";
}
for(j = 1; j <= (2 * r - 1); j++)
{
if(i == r || j == 1 || j == 2*i - 1){
cout<<"*";
}
else{
cout<<" ";
}
}
cout<<"\n";
}
}Editor is loading...
Leave a Comment