#include
int main()
{
float sum_salary=0,sum_raise=0,sum_newsalary=0;
while(1)
{
float salary,rate,raise,newsalary;
printf(\"Enter Salary :\");
scanf(\"%f\",&salary);
if(salary==-1)
{
if(sum_salary==0)
return 0;
else
{
printf(\"Total Salary :%f Total raise :%f Total New Salary:%f\",sum_salary,sum_raise,sum_newsalary);
return 0;
}
}
else
{
if(salary>=0 &&salary<30000)
rate=7;
else if(salary>=30000 &&salary<=40000)
rate=5.5;
else if(salary>40000)
rate=4;
raise=rate*salary/100;
newsalary=salary+raise;
 Â
sum_salary=salary+sum_salary;
sum_raise=raise+sum_raise;
sum_newsalary=newsalary+sum_newsalary;
printf(\"Salary :%f rate :%f Raise :%f New Salary:%f\n\",salary,rate,raise,newsalary);
}
}
}
Hi can you please make sure that the following program will askthe user the following question before the salaries are entered? Iam not sure where I would have to add this in for it ask that. Ifyou can fit this requirement in the program that will be greatlyappreciated. Thank you
Here is the question that the program should ask, \"Howmany salaries do you want to enter?\"