Pakistan Flag using C++ : For Loop

‪#‎include‬ <iostream.h>
#include <conio.h>
void main(){
clrscr();
int x=20,z=x-14;
for(int i=z-z;i<=x+x;i++){ cout<<"*";}cout<<endl;
for(int j=z-z;j<=x;j++){cout<<"ÛÛÛÛÛÛÛÛÛÛ\t\t\t\t*\n";}
for(int k=z-z;k<=x+x;k++){ cout<<"*";}
gotoxy(x,z++); {cout<<" _**";}
gotoxy(x,z++); {cout<<" *";}
gotoxy(x,z++); {cout<<" * * ";}
gotoxy(x,z++); {cout<<" ** ** **";}
gotoxy(x,z++);{cout<<" *** *** ";}
gotoxy(x,z++);{cout<<" ** * *";}
gotoxy(x,z++);{cout<<" * ";}
gotoxy(x,z++);{cout<<" *";}
gotoxy(x,z++);{cout<<" ~**";}
gotoxy(1,24);{for(int c=1;c<=21;c++)cout<<"**\n";}
getch();
}

No comments

Powered by Blogger.