Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
TUGAS MENYUSUL DIKARENAKAN KEMARIN ERROR
#1
KELAS 13.1A.21

ANGGOTA :

ARIF DWI SAPUTRA (13180695)
IRAWAN ANDI KUSUMA (13180325
DAVID PRATAMA (13180514)
JANITRA (13180331) 
AHMAD TOBRONI (13180506) 
HANIF (1318423)


LET'S DO IT


1. FILM

if (lama >=10)
{
by_diskon=harga*lama*10/100;
}
else if(lama <=10)
{
by_diskon=harga*0/100;
}
 }
total=lama*harga-by_diskon;

clrscr();

cout<<"=========================================="<<endl;
cout<<"\tSewa DVD FILM UBSI \n";
cout<<"=========================================="<<endl;
cout<<"Judul Film   : "<<judul<<endl;
cout<<"Harga Sewa/hari    : "<<harga<<endl;
cout<<"Biaya Diskon    : "<<by_diskon<<endl;
cout<<"Lama  Pinjam      : "<<lama;printf("\thari\n");
cout<<"=========================================="<<endl;
cout<<"Total          : "<<total;
cout<<"\n=========================================="<<endl;
cout<<"\n\tINGIN INPUT LAGI [Y/T] : "; cin>>lagi;
if (lagi == 'y' || lagi =='Y')
goto awal;
getch();
}


2. JARI JARI

#include<iostream>
#include<conio>

main()
{
int r;
char lagi, atas;
float phi=3.14;
float keliling;

cout<<"\t\t=======Tugas 2=======";

atas:
cout<<"\nMasukkan jari-jari\t: ";cin>>r;
keliling=2*phi*r;
cout<<"Keliling\t\t: "<<keliling<<endl;

cout<<"\n Apakah anda ingin mencoba lagi? [Y/N] : ";cin>>lagi;
          if(lagi=='Y'||lagi=='y')
                        goto atas;


                        else
                        cout<<"\n\t\t=====TERIMA KASIH=====";


getch();
}

3. KODE BARANG

 #include<iostream>
#include<conio>

main()

{
int kode;
char atas;
float jumlah, harga, bayar, diskon, total;

cout<<"\t\t\t========TUGAS 1========\n";
cout<<"\nKode\t: 1.Beras";
cout<<"\n\t  2.Minyak";
cout<<"\n\t  3.Gula";
atas:
cout<<"\n\nKode barang\t: ";cin>>kode;
if (kode==1)
   {cout<<"Nama barang Beras";}
   else if (kode==2)
   {cout<<"Nama barang Minyak";}
   else if(kode==3)
   {cout<<"Nama barang Gula"; }
   else
   {cout<<"Kode yang anda masukkan salah\n";
   goto atas; }

cout<<"\n\nHarga\t\t : ";cin>>harga;
cout<<"Jumlah barang\t : ";cin>>jumlah;
bayar=harga*jumlah;
cout<<"Total Harga\t : "<<bayar<<endl;
diskon=0.1*bayar;
if (bayar>=100000)
cout<<"Diskon 10%\t : "<<diskon<<endl;
else diskon=0;
total=bayar-diskon;
cout<<"\nTotal yang harus dibayar\t: "<<total<<endl;


getch();
}


4. MENU MAKANAN

#include<conio>
#include<iostream>

void nasgor()
{
cout<<"\nIni Adalah Menu Nasi Goreng\t";
}
void miegoreng()
{
   cout<<"\nIni Adalah Menu Mie Goreng\t";

}
void capcay()
{
cout<<"\nIni Adalah Menu Capcay\t";
}

void main()
{
char lagi;
   int pilihan;

       {

   cout<<"\t\t ===========================\n";
   cout<<"\t\t MENU RUMAH MAKAN UBSI\n";
   cout<<"\t\t ===========================\n";

   cout<<"Menu :";
   cout<<"\t1.Nasi Goreng\n";
   cout<<"\t2.Mie Goreng\n";
   cout<<"\t3.Capcay\n";
      atas:

         cout<<"\nPilih Menu : ";
         cin>>pilihan;

         if (pilihan==1)
         {
         cout<<"\nMenu 1";
          nasgor();
         }

         else if (pilihan==2)
         {
          cout<<"\nMenu 2";
          miegoreng();
         }

         else if (pilihan==3)
         {
          cout<<"\nMenu 3";
          capcay();
         }

         else
         cout<<"\n kode yang anda tidak ada di list";

      }
  cout<<"\n Apakah ingin pilih lagi? [Y/N] : ";cin>>lagi;
          if(lagi=='Y'||lagi=='y')
                        goto atas;


  getch();
}





SEKIAN TERIMA KASIH Heart Heart Heart Tongue Tongue Tongue Tongue
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)