Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Rewrite the following programs using conditional operators. (C code PLEASE) main() { float sal; printf(Enter the salary); scanf(%f, &sal); if(sal 25000) printf(Manager); else if(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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started