Thursday

Write a C program to find the commission amount on the basis of sales amount as per following conditions.

Sales amount (Rs)                    Commission
0-1000                                     5%
1001-2000                               10%
>2000                                     12%                          

            #include<stdio.h>
#include<conio.h>
void main()
  {
    float s,ca;
             clrscr();
    printf("\nEnter sales amount: ");
              scanf("%f",&s);
              if(s>=0 && s<=1000)
                ca=0.05*c;
               else if(s>1000 && s<=2000)
     ca=0.1*c;
    else
     ca=0.12*c;
     printf("Your Commission is Rs. %.2f",ca);
    getch();
  }

No comments:

Post a Comment

Rahul-Notes