var num1, num2 : int
var quotient, remainder : int
var answer : real
% ask the user for two positive integers
put "Please enter two positive integers: " ..
get num1, num2
% perform integer division and output results
quotient := num1 div num2
remainder := num1 mod num2
put "Integer Division: "..
put num1, "/", num2, " = ", quotient, " remainder ", remainder
% perform real division and output the results
answer := num1/num2
put "Real Number Division: "..
put num1, "/", num2, " = ", answer
Comments (0)
You don't have permission to comment on this page.