1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | uses wincrt; var x,y,hasil:real; jawab:char; begin write ('masukan angka ke-1:');readln (x); write ('pilih operator: (+)/(-)/(*)/(/)');readln (jawab); write ('masukan angka ke-2:');readln (y); if ( jawab= '+') then begin hasil:= x+y end; if ( jawab = '-') then begin hasil:= x-y end; if ( jawab = '*') then begin hasil:= x*y end; if (jawab='/') then begin hasil:= x/y end; write ('hasilnya: ',(hasil):5:2); end. |
Kamis, 14 Oktober 2010
Pascal - Prog Kalkulator Sederhana
Pascal - Prog Kalkulator Sederhana
Reviewed by Agha
on Kamis, 14 Oktober 2010
Rating: 4.5
Categori:
Pmrograman Pascal
0 comments:
Posting Komentar