Write a program in c ( WAPIC ) to input salesman name and his total sales and print his name, his commission and the additional commission.
A chemical co. offers commission to their salesman at rate of 5% of the total sales amount in order to increase the sales, the company offers an additional commission at 3% of the amount exceeding Rs. 10,000.
Write a prWrite a proogram in c ( WAPIC ) to input salesman name (sn) and his total sales (ts) and print his name, his commission (c) and the additional commission (ac).
Write a prWrite a proogram in c ( WAPIC ) to input salesman name (sn) and his total sales (ts) and print his name, his commission (c) and the additional commission (ac).
#include< void main( ) { char sn[25]; float ts, c, ac; printf("Enter the salesman name and his total sales\n"); scanf("%s %f", sn, &ts); c = ts*0.05; if (ts > 10000) ac = (ts - 10000)*0.03; else ac = 0; printf("Salesman name is %s \n", sn); printf("His commission is Rs %f \n", c); printf("The additional commission is Rs %f \n", ac); } |
---|
0 comments:
Post a Comment