Basic Programs

If Else based Programs

Loop Based Programs

Array Based Programs

String Programs

Function Programs

Pointers Programs

Structure & File Handling Programs

Data Structure Programs

If Else based Programs

C Program to calculate bonus based on sales

   Program to calculate the bonus on sales made by an employee.

    1. upto 1000 —> No bonus (0 bonus)

    2. 1000-5000 –> 5% bonus on the total sale.

   3.  sale >5000 –>10 % bonus on the total sale

 

#include<stdio.h>
#include<conio.h>
int main() { int sales=0,bonus=0; printf("enter the sales\n"); scanf("%d",&sales); if(sales<100)
{ bonus=0;
}
if(sales>=100 && sales <5000)
{
bonus=sales*5/100;
}
if(sales>=5000)
{
bonus=sales*10/100;
}
printf("Bonus =%d",bonus);
}

Output of the above program is as following.

Video/ C Introduction

Watch video in full size
Wordpress Social Share Plugin powered by Ultimatelysocial