-->
Showing posts with label program to get commission on different basis. Show all posts
Showing posts with label program to get commission on different basis. Show all posts

A company provides commission on the basis of total sales. Find commission.

//A company provides commission on the basis of total sales as follows.
 //        sales<10000-------------------------------->no commission
 //        sales >=10000 and <100000------------->5% commission
 //         sales>100000                  ---------------->10%commission
#include<stdio.h>
#include<conio.h>
void main()
{
float total_sales;
float total_commission;
printf("enter total sales \n");
scanf("%f",&total_sales);
if(total_sales<10000)
    {
          printf("total commission=Rs. 0\n");
    }
elseif(total_sales>=10000 && total_sales<=100000)
    {
         total_commission=total_sales*0.05;
         printf("the amount=%f\n",total_commission);
      }
elseif(total_sales>100000)
    {
        total_commission=total_sales*0.1;
         printf("the amount=%f\n",total_commission);
      }    
printf("thank you!!!!\n");
getch();
}