Tuesday, 14 October 2014

Program Calculator

 Ini Pemirsa yang mau tau cara buat Calculator dari Pascal.. Maklum Tampilan Sederhana Pemirsa....

program kalkulator;
uses wincrt;
var
a,b,c,d:integer;
e,f,g:real;
begin
clrscr;
repeat
a:=5;
writeln('      Program Kalkulator             ');
writeln('=====================================');
writeln;
 write('*************************************');
   writeln;
   writeln(' Macam-macam program kalkulator');
   writeln('________________________________');
   writeln;
   writeln('1.Tambah');
     writeln('2.Kurang');
     writeln('3.Kali');
     writeln('4.Bagi');
     writeln('5.Keluar');
      writeln('__________________________________');
        writeln;
        write('Tentukan Pilihan Anda');readln(a);
        case a of
        1:begin
        write('Masukan Angka Pertama:');readln(b);
         write('Masukan Angka Kedua:');readln(c);
         d:=b+c;
         writeln('Hasil :',d);readln;
         end;

            2:begin
        write('Masukan Angka Pertama:');readln(b);
         write('Masukan Angka Kedua:');readln(c);
         d:=b-c;
         writeln('Hasil :',d);readln;
         end;
         3:begin
        write('Masukan Angka Pertama:');readln(b);
         write('Masukan Angka Kedua:');readln(c);
         d:=b*c;
         writeln('Hasil :',d);readln;
         end;
         4:begin
        write('Masukan Angka Pertama:');readln(e);
         write('Masukan Angka Kedua:');readln(f);
         g:=e/f;
         writeln('Hasil :',g);readln;
         end;
          end;
           writeln('*************************************');
           writeln;
          writeln('Thanks For Trying My Program');
          writeln;
           writeln('*************************************');
           readln;
           clrscr;
           until a=5
           end.
Posted By: brema bastanta

Program Calculator

Share:

Post a Comment

Facebook
Blogger

Follow Us

About Us

Advertisment

Like Us

© OFFICIAL BLOG SEDERHANA BREMA | BREMA NOTE BLOG All rights reserved | Theme Designed by Seo Blogger Templates Published.. Blogger Templates