1.11M Members

help me to create a game program in pascal

 
0
 

hi
is there anyone who can help me to create a game program in pascal
hoping that one of you can help me please
even a simple calculator coz i really dont know how to create

 
0
 

It is a really simple calculator :)

program simple_calculator;
uses crt;
var a,b,result:real;
    m:set of char;
    choice:char;
begin
     clrscr;
     m:=[];
     include(m,'+');
     include(m,'-');
     include(m,'*');
     include(m,'/');
     repeat
           write('num1: ');
           readln(a);
           write('num2: ');
           readln(b);
           write('operator: + - * /  : ');
           readln(choice);
           case choice of
                '+':result:=a+b;
                '-':result:=a-b;
                '*':result:=a*b;
                '/':result:=a/b;
           end;
     until choice in m;
     writeln;
     writeln(a:0:0,choice,b:0:0,'=',result:0:2);

     while not keypressed do continue;
end.

(*created by FlamingClaw 2010.02.02.*)
 
0
 

npt work in pascal dev 1.9.2

You
This article has been dead for over six months: Start a new discussion instead
Post:
Start New Discussion
Tags Related to this Article