Computer Studies
Write a program in QBASIC format to find the value of 's' in the given equation, taking the suitable value of 'u' , 'v' and 'a' as input.
s = (v2 - u2) / 2a
QBASIC
QBASIC: Input Statement
51 Likes
Answer
Cls
Input "Enter the value of u"; u
Input "Enter the value of v"; v
Input "Enter the value of a"; a
Let s = (v * v - u * u) / (2 * a)
Print "Value of s = "; s
End
Output
Enter the value of u ? 20
Enter the value of v ? 30
Enter the value of a ? 5
Value of s = 50
Answered By
27 Likes
Related Questions
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
You want to calculate the total runs made by Sachin Tendulkar only in terms of centuries and half-centuries in test matches. Write a program in the QBASIC format taking the numbers of centuries and half-centuries as input. Display the total runs made by Sachin in centuries and half-centuries separately.
In an examination, 20% students failed in English and 30% failed in Maths. Write a program in QBASIC format to find the total number of students who failed in both the subjects taking the total number of students in the class as input.
You purchased a Computer textbook and an Oxford dictionary. The shopkeeper allows 10% discount on the textbook and 20% discount on the dictionary. Write a program in QBASIC format to calculate the total discount and the amount to be paid to the shopkeeper, taking price of the books as input.