Home > Back-end >  Look for the great god
Look for the great god

Time:10-05

CodePudding user response:

 
#include

Int main (void)
{
Int salary;
Printf (" * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * \ n ");
Printf (" the worker wages management system management system \ n ");
Printf (" * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * \ n ");
Printf (" please input to the query employees a working time (RMB 1000-7999) : \ n ");
The scanf (" % d ", salary);
The switch (salary)
{
Case 5000... 8000: printf (" senior title "); break;
Case 3000... 4999: printf (" intermediate title "); break;
Case 1000... 2999: printf (" primary title "); break;
}
return 0;
}


CodePudding user response:

C language case statement does not support the scope of the definition, the switch statement into the if the else!
If (salary> 5000 & amp; & Salary
=8000)Printf (" senior title ");
Else if (salar & gt; 3000 & amp; & Salary<5000)
.

CodePudding user response:

Can't write ellipsis, although people can read, but the machine can't read
 
Case 5000 & lt;=salary & amp; & Salary & lt;=8000: printf (" senior title "); break;
Case 3000 & lt;=salary & amp; & Salary & lt;=4999: printf (" intermediate title "); break;
Case 1000 & lt;=salary & amp; & Salary & lt;=2999: printf (" primary title "); break;

CodePudding user response:

This is the first time to see
  • Related