WebSource
Pages
Home
JAVA
SE&STM
PPL
ADS
C
DAA
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
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment