You are on page 1of 1

Oval 1

============================================
#include <iostream.h>
#include <conio.h>
void oval(int);
void main()
{
clrscr();
int height;
cout<<"Enter Height of Oval greater than 5: ";
cin>>height;
cout<<endl;
oval(height);
getch();
}
void oval(int height)
{
cout<<" ";
for (int i=1;i<=height-4;i++)
{
cout<<"*";
}
cout<<endl;
cout<<" *";
for (int j=1;j<=height-4;j++)
cout<<" ";
cout<<"*"<<endl;
for (int k=1;k<=height-4;k++)
{
cout<<"*";
for (int l=1;l<=height-2;l++)
cout<<" ";
cout<<"*"<<endl;
}
cout<<" *";
for (int r=1;r<=height-4;r++)
cout<<" ";
cout<<"*"<<endl;
cout<<" ";
for (int t=1;t<=height-4;t++)
cout<<"*";
}
http://www.ravianeducation.blogspot.com
FARHAN: 03008855006