Question: Rewrite the following programs using conditional operators. (C code PLEASE) main() { float sal; printf(Enter the salary); scanf(%f, &sal); if(sal <40000&&sal>25000) printf(Manager); else if(sal <25000&&sal>)
Rewrite the following programs using conditional operators. (C code PLEASE)
main() {
float sal;
printf("Enter the salary");
scanf("%f", &sal);
if(sal<40000&&sal>25000)
printf("Manager");
else
if(sal<25000&&sal>)
printf("Accountant");
else
printf("Clerk");
}
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
