Tuesday, 23 September 2014

20:33

Assignment # 02
Object Oriented Programming
Program Code:
#include<iostream>
#include<conio.h>
using namespace std;
void main()
{int x,y;
 for(int x=5;x>=0;x--){

        for(int y=0;y<x;y++)
            {
                cout<<"*";
            }
       cout<<endl;
    }
 getche ();
}
Output:







Program Code:
#include<iostream>
#include<conio.h>
using namespace std;
void main()
{
int x,y;

   for(int x=5; x>=0; x--)

   {

      for(int z=5; z>x;  z--)

      {

      cout<<" ";

      }

      for(int z=1; z<=x; z++)

      {

cout<<"*";

      }

cout<<endl<<endl;

   }

   getche();

}

Written by

We are Creative Blogger Theme Wavers which provides user friendly, effective and easy to use themes. Each support has free and providing HD support screen casting.

0 comments:

Post a Comment

 

© 2013 All in One. All rights resevered. Designed by Templateism

Back To Top