Full Question:
The commission on a salesman’s total sales is as follows:
a) If sales <100, then there is no commission.
b) If 100>= sales <=500, then commission = 10% of sales.
c) If sales > 500, then commission = 100+8% of sales above 500
Solution:-
#include< stdio.h>
#include< conio.h>
int main( )
{
int sales;
float comm;
clrscr( );
printf("Enter the total sales:");
scanf("%d", &sales);
if(sales<100)
printf("\nSorry no Commission, please do more sales");
else if(sales>=100 && sales<=500)
printf("\nCommission : %f ", (sales*0.1));
else
{
comm=(sales-500)*0.08;
printf("\nCommission : %f ", (comm+100));
}
getch( );
return 0;
}
Monday, March 8, 2010
Subscribe to:
Post Comments (Atom)
Nice! You can also try C code champ for several C programs, codes and tutorials. C codechamp contains a great list of C programs and tutorials.
ReplyDeletehttp:\\ccodechamp.com
For Best C Programs with Full Explanatons..
ReplyDeleteVisit Here ►► Lightning Code
thnk u....
ReplyDeleteWelcome
DeleteThis comment has been removed by the author.
ReplyDeletesome c programming example i posted have a look
ReplyDeletehttp://www.computaholics.in/
Tq
Deletethanks for ur valuable inforamtion ,u want more inforamtion about C programming languages join C programming classes in bangalore,visit : Aptech computer education,my tage are : C training bangalore,C courses bangalore,C classes bangalore,C institute bangalore,C coaching centers bangalore,C programming institute in bangalore,C programming classes in bangalore
ReplyDeleteThnx.
ReplyDeleteradwap.blogspot.com see this all c pograme solution
ReplyDeleteTelling lie you....
DeleteThis blog is truly useful to convey overhauled instructive undertakings over web which is truly examination. I discovered one fruitful case of this truth through this blog. I will utilize such data now.โปรแกรมขายปลีก
ReplyDeleteWrite a C program to print all prime number between 1 to 300 using for loop.
ReplyDeleteCode of given problem:
int main()
{
int a,b;
printf("List of prime numbers between 1 to 300:\n");
printf("%d\t",a=2);
for(a=1;a<=300;a++)
{
for(b=2;b<=a-1;b++)
if(a%b==0)
break;
else if(b==a-1)
{
printf("%d\t",a);
}
}
return 0;
}
Very informative blog!
Please take some time to visit my blog @
Top 10 programming examples in C
Thanks!
write ac program to input the product number and the sales for the product and calculate the commission according to the commission rate shown below.
ReplyDeleteproduct commission rate
1 15%
2 10%
3 7%
4 5%
how to add all of the commission
ReplyDelete