Computer Studies
Write a program in QBASIC to find the value of the given expressions when a = 10, b = 5, c = 2.
- a2 +b3 +c4
- (a + b)2
- a2 + b2
- (a - b + c)2
QBASIC
QBASIC: Cmds & Stmts
58 Likes
Answer
Cls
Let A = 10
Let B = 5
Let C = 2
Let EXP1 = A * A + B * B * B + C * C * C * C
Let EXP2 = (A + B) ^ 2
Let EXP3 = A * A + B * B
Let EXP4 = (A - B + C) ^ 2
Print "ANSWER OF EXPRESSION 1= "; EXP1
Print "ANSWER OF EXPRESSION 2= "; EXP2
Print "ANSWER OF EXPRESSION 3= "; EXP3
Print "ANSWER OF EXPRESSION 4= "; EXP4
END
Output
ANSWER OF EXPRESSION 1= 241
ANSWER OF EXPRESSION 2= 225
ANSWER OF EXPRESSION 3= 125
ANSWER OF EXPRESSION 4= 49
Answered By
23 Likes
Related Questions
A salesman sold 14 chairs at the rate of ₹ 275 each and 3 tables at the rate of ₹ 650 each. Write a program in QBASIC to calculate the total sale.
Write a program in QBASIC to calculate the area and circumference of a circle of the radius 14 cm.
(Hint: Area of a circle = 22/7 * r2, Circumference = 2 * 22/7 * r)In a class of 60 students, 90% are present. Write a program in QBASIC to calculate the number of students present and absent.
The rate of petrol is ₹ 47.60 per litre. You paid ₹ 250 to the pump attendant and asked for 5 litres of petrol to be filled in the tank. Write a program in QBASIC to calculate the cost of petrol and the amount of money refunded.