Object oreinted programming Language Nested Loop Programe-
solve- #include<iostream.h>
* # include<conio.h>
* *
void main()
* *
* {
* *
* * int
a,b;
* *
* * * clrscr();
* *
* * for(a=1;a<=5;a++)
* * * {
* * for(b=1;b<=a;b++)
* cout<<”*”;
cout<<”\n”;
}
for(a=4;a.=1;a--)
{
for(b=1;b<=a;b++)
cout<<”*”;
cout<<”\n”;
}
cout<<”*”;
cout<<”\n”;
}
getch();
}
No comments:
Post a Comment