Rewrite the following code using the if-else statement: int m = 400; double cl). = (m>300) ? (m/10.0) * 2:(m/20.0)−2;
Advertisements
प्रश्न
Rewrite the following code using the if-else statement:
int m = 400;
double cl). = (m>300) ? (m/10.0) * 2:(m/20.0)−2;कोड लेखन
Advertisements
उत्तर
int m=400;
double ch;
if (m>300)
ch=(m/10.0)*2;
else
ch=(m/20.0)−2;shaalaa.com
Introduction of Conditional Statements in Java
क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
