Sabtu, 19 Desember 2009

TUGAS LOGIKA & ALGORITMA

#include<stdio.h>
#include<conio.h>
#include<iostream.h>
main()
{
int ttl. pot, jubay;
clrscr();
cout<<"Total Pembelian Rp.";cin>>ttl;
if(ttl>=50000&&ttl<=101000)
pot=0.05*ttl;
else if(ttl>=101000&&ttl<=151000)
pot=0.1*ttl;
else if(ttl>=151000)
pot=0.15*ttl;
else
pot=0;
cout<<"Besar Potongan Rp."<<pot<<endl;
jubay=ttl-pot;
cout<<"Jumlah Yang Harus Dibayar Rp."<<jubay<<endl;
getch();
}

TUGAS FLOW CHART