Class IX ICSE - Operators
Class IX ICSE - Operators
Program 1:
Write a program to find and display the value of the given expressions:
a) (x+3)/6 – (2x+5)/3; taking the value of x=5
b) (a^2 + b^2 + c^2)/abc; taking the values a=5,b=4,c=3
int a=5,b=4,c=3;
float sol = (a*a + b*b + c*c)/(a*b*c);
System.out.println(“Solution = ”+ sol);
}
}
Program 2:
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
Program 3:
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.
Program 4:
Write a program to find and display the percentage difference when:
a) a number is updated from 80 to 90
b) a number is updated from 7.5 to 7.2
Program 5:
The normal temperature of human body is 98.6°F. Write a program to convert the
temperature into degree Celsius and display the output.
Hint: c / 5 = f - 32 / 9
Program 6:
The angles of a quadrilateral are in the ratio 3:4:5:6. Write a program to find and
display all of its angles.
System.out.println("Angle 1 = "+angle1);
System.out.println("Angle 2 = "+angle2);
System.out.println("Angle 3 = "+angle3);
System.out.println("Angle 4 = "+angle4);
}
}