Computer Studies
Write a program in QBASIC format to accept the length of a rod in millimetres and express the same in centimetres and metres.
QBASIC
QBASIC: Input Statement
19 Likes
Answer
Cls
Input "Enter the length of the rod in mm "; L
Let Lcm = L / 10
Let Lm = L / 1000
Print "Length of rod = "; L; " mm"
Print "Length in centimetres = "; Lcm; " cm"
print "Length in metres = ";Lm ; " m"
End
Output
Enter the length of the rod in mm ? 3000
Length of rod = 3000 mm
Length in centimetres = 300 cm
Length in metres = 3 m
Answered By
9 Likes
Related Questions
Write down the syntax of:
(a) INPUT statement with a numeric variable.
(b) INPUT statement with an alphanumeric variable.Write a program in QBASIC to make a name sticker which includes your name, class, roll no., subject and school using INPUT statement. Display the output in the given format:
Name : Class : Roll No.: Subject : School :
Write a program in QBASIC format to print the total amount paid to the shopkeeper for purchasing the following items:
Number of exercise books = 10 Number of brown paper rolls = 4
Write a program in QBASIC to find the value of the given expressions after taking a suitable value of a and b from the console:
- a2+b 2
- (a+b) / ab