write a program in QBASIC format to accept the length of a rod in millimeters and express the same in centimeters and meters.
Answers
Answered by
18
Program in QBASIC format to accept the length of a rod in millimetres and express the same in centimetres and meters.
Procedural way to solve :
REM PROGRAM TO CONVERT MILLIMETER TO CENTIMETERS
CLS // to clear screen
INPUT ”Enter length of the rod in millimetres” ; M
C = M / 10 //divide by 10
PRINT “ Length of the rod in centimetres is ”; C
END
Answered by
1
Answer:
CLS
INPUT "ENTER THE LENTH OF THE ROD IN MM"; L
LET LCM = L/10
LET LM = L/1000
PRINT "LENTH OF ROD= "; L ; " MM "
PRINT " LENTH OF CM = "; LCM; "CM"
PRINT " LENTH IN M = "; LM; "M"
END
OUTPUT
ENTER THE LENTH OF THE ROD IN MM? 3000
LENTH OF ROD = 300O MM
LENTH IN CM = 300 CM
LENTH IN METER = 3 M
Similar questions