Pages

Wednesday, October 20, 2010

COMMISION C PROGRAMMING

#include<stdio.h>
#include<conio.h>

void main()
{
    float sales;
    float commission,per_commission;

    clrscr();
    printf("\n\tEnter the sales of the salesperson:^");
    scanf("%f",&sales);

    per_commission =0.10;

    if(sales>=5000)
    {
        commission =sales*per_commission;

        printf("\n\tThe amount of sales is P %.2f.",sales);
        printf("\n\tThe amount of commission is P %.2f.",commission);
    }
    else
        printf("\n\tThe amount of sales is P %.2f.",sales);
    getch();
}

No comments:

Post a Comment