मराठी

Rewrite the following program segment using if-else statements instead of the ternary operator. net = (salary > 10000) ? salary − (8.33 / 100) * salary : salary − (5 / 100) * salary. - Computer Applications

Advertisements
Advertisements

प्रश्न

Rewrite the following program segment using if-else statements instead of the ternary operator.

net = (salary > 10000) ? salary − (8.33 / 100) * salary : salary − (5 / 100) * salary.

थोडक्यात उत्तर

उत्तर

double net;
if (salary > 10000) 
net = salary − (8.33 / 100) * salary;
else
net = salary − (5 / 100) * salary; 
shaalaa.com
  या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?
पाठ 1.04: Operators in Java - EXERCISES [पृष्ठ ४४]

APPEARS IN

अविचल Computer Applications [English] Class 10 ICSE
पाठ 1.04 Operators in Java
EXERCISES | Q V. 7. (c) | पृष्ठ ४४
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×