computer programming problem. i need every step done in c programming format. pl
ID: 668566 • Letter: C
Question
computer programming problem. i need every step done in c programming format. please read problem and do each step.
Explanation / Answer
Hi,
Below is the solution to your problem:
#include<stdio.h>
void main()
{
float basic, da, hra, tax, pf, gross, net;
int no_of_hours,no_of_dependents,amount_hr;
char name[50];
clrscr();
printf(“ ENTER YOUR NAME…:”);
scanf(“%s”, &name);
printf(" ENTER THE NO OF HOURS LOGGED BY USER....");
scanf("%d",&no_of_hours);
printf("Enter amount paid per hour ");
scanf("%d,&amount_hr")
printf("Enter the number of Dependents[value must be 1,2,3 and... more ]");
scanf("%d",&no_of_dependents);
basic=no_of_hours*amount_hr;
while(no_of_hours<0)
{
if(no_of_dependents==1||2){
tax_on_basic=(15/100)*basic;
total_tax=tax_on_basic-basic;
}
else{
tax_on_basic=(12.5/100)*basic;
total_tax=tax_on_basic-basic;
}
gross = basic;
net = total_tax;
printf(“ THE GROSS SALARY IS…: %f”, gross);
printf(“ THE NET SALARY IS…: %f”, net);
getch()
}
}
Explaination:
Hope that helps...HAPPY ANSWERING!!!!!!!!!!!
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.