Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cmath>
- using namespace std;
- main()
- {
- int n{2};
- for (int i = 0; i<5; i++){
- for(int j = 0; j<n; j++){
- cout << "*";
- }
- cout << endl;
- if(n==11){
- return 0;
- }
- if(n>5){
- n+=4;
- }
- else if(n>2){
- n+=2;
- }
- else if(n==2){
- n++;
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement