Friday, April 5, 2019

C Program To Find Salesman Commission By Following The Below Conditions • If sales<=1000 then commission is 10% • If sales >=1000 then commission is 15% • If sales > 5000 then the commission is 20%

program:

#include<stdio.h>
void main()
{
float s,c;
printf("enter a string:");
scanf("%f",&s);
if(s<=1000)
{
c=(s*10.0)*100.0;
}
else if(s<=5000)
{
c=(s*15.0)*100.0;
}
else
{
c=(s*20.0)*100.0;
}
printf("Commission is %f",c);
}
output:-

No comments:

Post a Comment