Computer Applications
Write a program to find and display the value of the given expression:
a2 + b2 + c2 / abc;
taking the values a=5, b=4, c=3
Java
Java Operators
88 Likes
Answer
public class KboatExpression
{
public static void main(String args[]) {
int a = 5, b = 4, c = 3;
double value = (a * a + b * b + c * c) / (double)(a * b * c);
System.out.println("Result = " + value);
}
}
Variable Description Table
Program Explanation
Output
Answered By
45 Likes
Related Questions
Write a program to find and display the percentage difference, when a number is updated from 80 to 90
A person is paid ₹350 for each day he works and fined ₹30 for each day he remains absent. Write a program to calculate and display his monthly income, if he is present for 25 days and remains absent for 5 days.
Write a program to find and display the value of the given expression:
(x + 3) / 6 - (2x + 5) / 3;
taking the value of x = 5
In a competitive examination, there were 150 questions. One candidate got 80% correct and the other candidate 72% correct. Write a program to calculate and display the correct answers each candidate got.