Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- using namespace std;
- int main()
- {
- int i=1,num=1;
- while(i<=5)
- {
- int j=0;
- while(j<num)
- {
- cout<<i<<"\t";
- j++;
- }
- cout<<endl<<endl;
- i++;
- num++;
- }
- cout<<"\n1------------------------------\n";
- int y=6;
- i=0;
- while(i<5)
- { int j=1;
- while(j>=2)
- {
- cout<<j<<"\t";
- j++;
- }
- cout<<endl<<endl;
- i++;
- y--;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment