# Little man computer help

little man computer....help plzzz....urgent

can some1 pl help me write a program to perform the integer division of two numbers (dividend=divisor*quotient+remander). DIvidend and Divisor should be provided by the user, and the quotient and the remainder should be returned to the user. the user must also supply any numbers that may be required.

Related Programming and Computer Science News on Phys.org
PhY
Well depends what Language you're Writing in.

If it was Turbo pascal.
program div;
uses crt;
var
a:Integer;
b:integer;
c:integer;
begin

writeln ("Division of 2 numbers");
repeat
write (' Enter 2 numbers to divide by :');
until (a,b<>0);
C:=a/b;
Writeln (' Division of ',a,' by ',b,' := ,'c);

end;

Btw ..I haven't wrote pascal in 2 years sooo....not Snippet proof.

if it is in c++ you would do something like
int dividend;//given by the user somehow
int divisor;//given by the user somehow
int quotient = dividend/divisor;//performs integer division you'll get the right number
int remainder = dividend%divisor;//Modulus operator, gives you the remainder