Pascal Program!Please help Urgent!

Hi I Have to write a pascal program, that can be used as a calculator to perform any of the 4 basic arithmetic functions(addiotion, multiplication, subtraction and division for any two integers ata a time!
Can anyone help??

Comments

  • : Hi I Have to write a pascal program, that can be used as a calculator to perform any of the 4 basic arithmetic functions(addiotion, multiplication, subtraction and division for any two integers ata a time!
    : Can anyone help??
    :

    Hi, I try to post a full source code.

    From Xaser-3


  • : : Hi I Have to write a pascal program, that can be used as a calculator to perform any of the 4 basic arithmetic functions(addiotion, multiplication, subtraction and division for any two integers ata a time!
    : : Can anyone help??
    : :
    :
    : Hi, I try to post a full source code.
    :
    : From Xaser-3
    :
    :
    :

    This is the full calculator source code pasted below:

    program mathematical_operations;
    uses crt;
    var
    num1, num2 : integer;
    begin
    clrscr;
    writeln('Enter two numbers: ');
    readln ( num1, num2 );
    clrscr;
    writeln( 'Addition ':20, num1 + num2:7 );
    writeln( 'Subtratio ':20, num1 - num2:7 );
    writeln( 'Mutiplication ':20, num1 * num2:7 );
    writeln( 'Division ':20, num1 / num2:7:4 );
    writeln;
    textcolor(blue+blink);
    writeln('This program was written by Xaser-3');
    textcolor(blue+blink);
    readkey;
    end.

    By Xaser-3


  • : : : Hi I Have to write a pascal program, that can be used as a calculator to perform any of the 4 basic arithmetic functions(addiotion, multiplication, subtraction and division for any two integers ata a time!
    : : : Can anyone help??
    : : :
    : :
    : : Hi, I try to post a full source code.
    : :
    : : From Xaser-3
    : :
    : :
    : :
    :
    : This is the full calculator source code pasted below:
    :
    : program mathematical_operations;
    : uses crt;
    : var
    : num1, num2 : integer;
    : begin
    : clrscr;
    : writeln('Enter two numbers: ');
    : readln ( num1, num2 );
    : clrscr;
    : writeln( 'Addition ':20, num1 + num2:7 );
    : writeln( 'Subtratio ':20, num1 - num2:7 );
    : writeln( 'Mutiplication ':20, num1 * num2:7 );
    : writeln( 'Division ':20, num1 / num2:7:4 );
    : writeln;
    : textcolor(blue+blink);
    : writeln('This program was written by Xaser-3');
    : textcolor(blue+blink);
    : readkey;
    : end.
    :
    : By Xaser-3
    :
    :
    :
    The division symbol "/" will not work for integers, because that is a float division. You will need to use the "div" and "mod" reserved words instead.
  • : : : : Hi I Have to write a pascal program, that can be used as a calculator to perform any of the 4 basic arithmetic functions(addiotion, multiplication, subtraction and division for any two integers ata a time!
    : : : : Can anyone help??
    : : : :
    : : :
    : : : Hi, I try to post a full source code.
    : : :
    : : : From Xaser-3
    : : :
    : : :
    : : :
    : :
    : : This is the full calculator source code pasted below:
    : :
    : : program mathematical_operations;
    : : uses crt;
    : : var
    : : num1, num2 : integer;
    : : begin
    : : clrscr;
    : : writeln('Enter two numbers: ');
    : : readln ( num1, num2 );
    : : clrscr;
    : : writeln( 'Addition ':20, num1 + num2:7 );
    : : writeln( 'Subtratio ':20, num1 - num2:7 );
    : : writeln( 'Mutiplication ':20, num1 * num2:7 );
    : : writeln( 'Division ':20, num1 / num2:7:4 );
    : : writeln;
    : : textcolor(blue+blink);
    : : writeln('This program was written by Xaser-3');
    : : textcolor(blue+blink);
    : : readkey;
    : : end.
    : :
    : : By Xaser-3
    : :
    : :
    : :
    : The division symbol "/" will not work for integers, because that is a float division. You will need to use the "div" and "mod" reserved words instead.
    :

    Do you want I program this program agian as you told me?



Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories