Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- int var;
- cout << "vvedute rasmer elku: ";
- cin >> var;
- int a=0;
- while (a < var){
- int b=0;
- while (b < var - a) {
- cout << " ";
- b++;
- }
- b = 0;
- while (b < (a*2) - 1) {
- cout << "*";
- b++;
- }
- cout << endl;
- a++;
- }
- int c = 0;
- while (c<var-1) {
- cout << " ";
- c++;
- }
- cout << "*";
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement