Posts

Showing posts from April, 2020

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;   ...

Program to print half pyramid using * and 123 ||how to print a pattern in c++ // pyramid in pattern form with easy method //Source code

Source Code: #include<iostream> #nclude<conio.h> using namespace std;  int main() { for(int r=1;r<=5; r++) { for(int c=1;c<=r;c++)     {               cout<<"*";       } cout<<endl;   // to terminate the row and went to next row }    getch(); } Output: * * * * * * * * * * * * * * * OUTPUT 1 1 2 1 2 3 1 2 3 4 1 2 3 4 5 Source Code: #include<iostream> #nclude<conio.h> using namespace std;  int main() { for(int r=1;r<=5; r++) // this for loop is for rows { for(int c=1;c<=r;c++)  // this for loop is for columns     {               cout<<c;       } cout<<endl;   // to terminate the row and went to next row }    getch(); }

Hello world program _ find Even Odd Numbers in c++

Source Code: #include<iostream> #nclude<conio.h> using namespace std;  int main() {  cout<<"Hello Word"<<endl; cout<<"Welcome to MH Computer Academy ";    getch(); } OutPut: Hello Word Welcome to MH Computer Academy 1. How to find Even and Odd no in C++ language  #include<iostream> #include<conio.h> using namespace std; int main() { int n=0; cout<<"Please!!! Enter a Number:"; cin>>n; if(n%2==0)   {    cout<<"Yes !!! You Entered an Even Number";    } else if(n%2!=0)   {    cout<<"Sorry!!! You Entered an Odd Number";    } } For More Programs Visit : MH Computer Academy  and codesolutions.blogspot.com

MH Computer Channel Intro Video // Please visit and Subscribe our Youtube Channel // Muhammad Hashmi

Image
Hello Every body !!!! Assalam O Alaikum . I am Muhammad Hashmi. I made this blog site for the the purpose of sharing knowledge about computer and programming Languages . So, i also have a YouTube channel with the same name of MH Computer Academy. If you think that this blog is help full for you so please visit to our YouTube Channel(MH Computer Academy ) YOuTube: MH Computer Academy