Inverted half Paramid by using * and 123, in C++ // YouTube: MH Computer Academy

OutPut


* * * * *
* * * *
* * * 
* *
*
#include<iostream>
#include<conio.h>
using namespace std;
int main()
{
for(int r=5;r>=1;r--) // this for loop is used for no of rows
   {
    for(int c=r;c>=1;c--) // this for loop is ussed for no of columns
      {
        cout<<"*";
        }
       cout<<endl;
    }

}
For more programs visit: codesolutions.blogspot.com
Mr. Muhammad Hashmi 


1 2 3 4 5
1 2 3 4 
1 2 3
1 2
1
#include<iostream>
#include<conio.h>
using namespace std;
int main()
{
for(int r=5;r>=1;r--) // this for loop is used for no of rows
   {
    for(int c=r;c>=1;c--) // this for loop is ussed for no of columns
      {
        cout<<c;
        }
       cout<<endl;
    }
}
For more programs visit: codesolutions.blogspot.com
Mr. Muhammad Hashmi 

Comments

Popular posts from this blog

How to create Simple ATM Machine in C++ Program||ATM Program deposit withdraw money in c++|Using CLI || C++ project with Source Code || MH Computer Academy(Muhammad Hashmi)

How to Calculate GPA/CGPA || GPA Calculator Step by Step in C++ ||Sourc...

C++ Project GYM Management System || Source Code with Explanation | MH Computer Academy || Muhammad Hashmi || Learn Programming