//Program 4 in 1
//created by maiaachiea
#include<conio.h>
#include<iostream.h>
#include<stdlib.h>
main()
{
char inp;
int u, awal,pil;
int nilai[10];
float rata2,jml;
awal:
clrscr();
cout<<"||=============================||"<<endl;
cout<<"|| MENU UTAMA ||"<<endl;
cout<<"||=============================||"<<endl;
cout<<"|| A. Identitas Diri ||"<<endl;
cout<<"|| B. Hitung Rata-Rata Nilai ||"<<endl;
cout<<"|| C. Konversi Mata Uang Asing ||"<<endl;
cout<<"|| D. Kalkulator Sederhana ||"<<endl;
cout<<"|| E. Keluar ||"<<endl;
cout<<"||=============================||"<<endl;
cout<<"|| MASUKKAN PILIHAN ANDA : ||"<<endl;
cout<<"||=============================||"<<endl;
gotoxy(29,10); cin>>inp;
if(inp=='A'||inp=='a')
{
clrscr();
cout<<" IDENTITAS DIRI "<<endl;
cout<<"----------------------------------------"<<endl;
cout<<" Nama : Maya Fitri Asia"<<endl;
cout<<" NPM : 120403020079 "<<endl;
cout<<" TTL : Malang, 30 April 1993 "<<endl;
cout<<" Alamat : Turen MALANG"<<endl;
cout<<" Blog : http://maiav3.blogspot.com/"<<endl;
cout<<"----------------------------------------"<<endl;
cout<<"\nTekan Enter untuk kembali ke menu utama ";
u=getch();
goto awal;
}
else if(inp=='B'||inp=='b')
{
clrscr();
jml=0;
for(int i=0;i<10;i++)
{
cout<<"Masukkan nilai Mahasiswa ke- "<< i <<" : ";
cin>>nilai[i];
jml+=nilai[i];
}
cout<<"Tabel Nilai Mahasiswa "<<endl;
cout<<"---------------------"<<endl;
cout<<" Mahasiswa Nilai "<<endl;
for(int b=0;b<10;b++)
{
cout<<" "<<b+1<<" "<<nilai[i]<<endl;;
}
cout<<"---------------------"<<endl;
rata2=jml/10;
cout<<"Nilai Total :"<<jml<<endl;
cout<<"Nilai Rata-rata : "<<rata2<<endl;
cout<<"\nTekan Enter untuk kembali ke menu utama ";
u=getch();
goto awal;
}
else if(inp=='C'||inp=='c')
{ clrscr();
float uang;
long hasil;
cout<<"KONVERSI MATA UANG ASING KE IDR (INDONESIA RUPIAH) "<<endl;
cout<<"--------------------------------------------------"<<endl;
cout<<"Pilihan Mata Uang :"<<endl;
cout<<" 1. USD (United States Dollar)"<<endl;
cout<<" 2. AUD (Australian Dollar)"<<endl;
cout<<" 3. JPY (Japane Yen)"<<endl;
cout<<" 4. EUR (Euro)"<<endl;
cout<<" 5. GBP (United Kingdom Pound)"<<endl;
cout<<"\nMasukkan Pilihan Anda : "; cin>>pil;
cout<<"Masukkan Nilai Uang : "; cin>>uang;
cout<<"\n";
if(pil==1)
{
hasil=uang*8700;
cout<<"Uang USD "<<uang<<" Setara dengan "<<hasil<<" Rupiah"<<endl;
}
else if(pil==2)
{
hasil=uang*8900;
cout<<"Uang AUD "<<uang<<" Setara dengan "<<hasil<<" Rupiah"<<endl;
}
else if(pil==3)
{
hasil=uang*106;
cout<<"Uang JPY "<<uang<<" Setara dengan "<<hasil<<" Rupiah"<<endl;
}
else if(pil==4)
{
hasil=uang*12200;
cout<<"Uang EUR "<<uang<<" Setara dengan "<<hasil<<" Rupiah"<<endl;
}
else if(pil==5)
{
hasil=uang*13900;
cout<<"Uang GBP "<<uang<<" Setara dengan "<<hasil<<" Rupiah"<<endl;
}
cout<<"\nTekan Enter untuk kembali ke menu utama ";
u=getch();
goto awal;
}
else if(inp=='D'||inp=='d')
{ clrscr();
int a1,a2;
char op;
float h;
cout<<" KALKULATOR SEDERHANA "<<endl;
cout<<"------------------------------------"<<endl;
cout<<"Masukkan Angka Ke-1 :"; cin>>a1;
cout<<"Pilih OPerator : (+)/(-)/(*)/(/) :"; cin>>op;
cout<<"Masukkan Angka Ke-2 :"; cin>>a2;
if(op=='+')
{
h=a1+a2;
}
else if(op=='-')
{
h=a1-a2;
}
else if(op=='*')
{
h=a1*a2;
}
else if (op=='/')
{
h=a1/a2;
}
cout<<"\nHasil Perhitungan :"<<h<<endl;
cout<<"\nTekan Enter untuk kembali ke menu utama ";
u=getch();
goto awal;
}
else if(inp=='E'||inp=='e')
{
cout<<"Terima Kasih, Sampai Jumpa.......";
exit(1);
}
else
{
cout<<"\nPilihan anda salah, silahkan ulangi dengan memasukkan pilihan yang tersedia"<<endl;
cout<<"\nTekan Enter untuk kembali ke menu utama ";
u=getch();
goto awal;
}
getch();
}
Posting Komentar