You are on page 1of 2

# NIM: 017.01.

0057
Nama: Deni Trisna
Jurusan Teknik Informatika
Kelas A2

#include<iostream.h> cout<<"*"; }
#include<conio.h> else getch();
#include<iomanip.h> cout<<" "; break;
void main() cout<<endl; }
{ } case 6:
int pilih; getch(); {
do{ break; for(int i=1;i<=10;i++)
clrscr(); } {for(int j=1;j<=10;j++)
Pilihan"<<endl; { cout<<"*";
cout<<"1. Diagonal for(int i=1;i<=10;i++) else
bawah"<<endl; {for(int j=1;j<=10;j++) cout<<" ";
cout<<"2. Diagonal if((i==j)||(i+j==11)) cout<<endl;
atas"<<endl; cout<<"*"; }
cout<<"3. Silang"<<endl; else getch();
cout<<"4. Atas"<<endl; cout<<" "; break;
cout<<"5. Bawah"<<endl; cout<<endl; }
cout<<"6. Bawah } case 7:
Kiri"<<endl; getch(); {
cout<<"7. Bawah break; for(int i=1;i<=10;i++)
Kanan"<<endl; } {for(int j=1;j<=10;j++)
cout<<"8. Keluar"<<endl; case 4: if(i<j)
cout<<"Pilihan { cout<<"*";
Anda:";cin>>pilih; for(int i=1;i<=10;i++) else
switch(pilih) {for(int j=1;j<=10;j++) cout<<" ";
{ if(i+j<=11) cout<<endl;
case 1: cout<<"*"; }
{ else getch();
for(int i=1;i<=10;i++) cout<<" "; break;
{for(int j=1;j<=10;j++) cout<<endl; }
if(i==j) } }
cout<<"*"; getch(); }while(pilih|8);
else break; getch();
cout<<" "; } }
cout<<endl; case 5:
} {
getch(); for(int i=1;i<=10;i++)
break; {for(int j=1;j<=10;j++)
} if(i+j>=11)
case 2: cout<<"*";
{ else
for(int i=1;i<=10;i++) cout<<" ";
{for(int j=1;j<=10;j++)
if(i+j==11) cout<<endl;
NIM: 017.01.0057
Nama: Deni Trisna
Jurusan Teknik Informatika
Kelas A2