Selasa, 03 Mei 2011

bahasa c++

# include “stdio.h”
#include “conio.h”
#include “iostream.h”
Void main(){
Int p,l,s,pil,r;
Float ls,vol,kel;
Do{
Clrscr;
Gotoxy (20,5);cout<<”menu”; Gotoxy (20,6);cout<<”1.hitung volume”; Gotoxy (20,7);cout<<”2.hitung luas lingkaran”; Gotoxy(20,8);cout<<”3.hitung luas persegi panjang”; Gotoxy (20,9);cout<<”4.hitung keliling lingkaran”; Gotoxy (20,10);cout<<”5.hitung keliling persegi panjang”; Gotoxy (20,11);cout<<”6.keluar”; Clrscr; Case 1: Gotoxy (20,5);cout <<”hitung volume”; Gotoxy (20,6);cout<<”sisi”;cin>>s;
Vol=s*s*s;
Gotoxy=(20,7);cout <<”volume:”<>r;
Ls=3.14*r*r; kel=2*3.14*r;
Gotoxy (20,7);cout<<”l.ling:”<>p;
Gotoxy (20,7);cout<<”lebar:”;cin >>l;
Ls=p*l;kel=2*(p+l);
Gotoxy (20,8);cout <<”luas persegi panjang:”< Break;
}
Get che ();
}while(pil 1=6);
}

Tidak ada komentar:

Posting Komentar