Cod sursa(job #3298804)
Utilizator | Data | 1 iunie 2025 21:56:25 | |
---|---|---|---|
Problema | A+B | Scor | 0 |
Compilator | cpp-64 | Status | done |
Runda | Arhiva de probleme | Marime | 0.59 kb |
#include <iostream>
using namespace std;
int main(){
while(true){
for(int i = 1; i <= 5; i ++){
int c = 0;
while(c < 5 - i){
cout << " ";
c ++;
}
int r = 0;
while(r < i){
cout << '*'; r ++;
}
cout << endl;
}
for(int i = 4; i > 0; i --){
int c = 0;
while(c < 5 - i){
cout << " ";
c ++;
}
int r = 0;
while(r < i){
cout << '*'; r ++;
}
cout << endl;
}
}
return 0;
}