Write a program is the calculate the net_salary of an officers. if officers not come in the office then deducted the salary on his gross-salary .
#include<stdio.h>
main()
{ int net_salary,gross_salary=13000,n,day=30;
printf(" Enter the day not of come in the officers:\n");
scanf("%d",&n);
if(day>n)
{
net_salary=gross_salary/30*n;
printf(" your net salary deducted is : %d",net_salary);
}
else
{
printf(" Not deducted from salary . your salary net salary has paid %d",gross_salary);
}
}
OUTPUT :
Enter the day not of come in the officers:
1
your net salary deducted is : 433
No comments:
Post a Comment