You are on page 1of 2

Dietel and Dietel Exercise Solution 2.

48
============================================
#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
int value1,value2,valu3,value3,value4,value5;
cout<<"Enter the value1 ";
cin>>value1;
cout<<"Enter the value2 ";
cin>>value2;
cout<<"Enter the value3 ";
cin>>value3;
cout<<"Enter the value4 ";
cin>>value4;
cout<<"Enter the value5 ";
cin>>value5;
cout<<endl<<endl;
for(int i=0;i<value1;i++)

cout<<"*";
cout<<endl;
for(i=0;i<value2;i++)

cout<<"*";
cout<<endl;

for(i=0;i<value3;i++)

cout<<"*";
cout<<endl;

for(i=0;i<value4;i++)

cout<<"*";
cout<<endl;

for(i=0;i<value5;i++)

cout<<"*";
cout<<endl;

getch();
}

http://www.ravianeducation.blogspot.com
FARHAN: 03008855006