Pages

Wednesday, October 20, 2010

SALES REPORT

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

void main()
{
    float sales,RWP,WC,GP;
    float RC;

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

    RWP =1000;

    if(sales>5000)
    {
        RC =9.7/100;
        WC =sales*RC;
        GP =RWP+WC;
    }
    else
    {
        WC =250;
        GP =RWP+WC;
    }
    printf("\n\tThe weekly sales of the salesperson is: P %.2f",sales);
    printf("\n\tThe regular weekly pay of the salesperson is: P %.2f",RWP);
    printf("\n\tThe weekly commission of the salesperson is: P %.2f",WC);
    printf("\n\tThe gross pay  for the salesperson is: P %.2f",GP);
    getch();
}

No comments:

Post a Comment