Computer Science, asked by thanmaiteja11, 1 year ago

write a program to divide two numbers and print the remainder and quotient in qbasic

Answers

Answered by Manindersingh11
0
in python.
def fun(x,y):
.......z=x%y
.......c=x//y
.......print('remainder is '+z+' and quotient is '+c)
fun(5,2)

#output=remainder is 1 and quotient is 2
Answered by ujwalk13
3

Answer:

CLS

INPUT "enter the dividend"; a

INPUT "enter the divisor"; b

c = a MOD b

d = a \ b

PRINT "the remainder is"; c

PRINT "the quotient is"; d

END

Explanation:

The dividend is the value or the amount which we need to divide.

The number we divide by is called divisor.

mod is used to divide 2 numbers and print the remainder

if u can notice the sign i used is "\" not "/" it is because "\" doesn't include the decimal that is normally used to make the remainder 0

Similar questions