Question: Need meaningful comments for this source code... PLEASE HELP! The source code should work, I really just need comments on what each line of source
Need meaningful comments for this source code... PLEASE HELP!
The source code should work, I really just need comments on what each line of source does in the code. Thank You!
#include int main() { int hwork,hwage,taxrate,tax,othour,otwage; float salary,netpay; printf("enter hours worked in a week "); scanf("%d",&hwork); printf("enter hourly wage "); scanf("%d",&hwage); if(hwork<=40) { salary=hwork*hwage; if(salary<=600) { taxrate=15; tax=(taxrate*salary)/100; netpay=salary-tax; printf("Gross Pay\tTax Rate\t Net Pay "); printf("$ %f\t$ %d(15%%) \t$ %f ",salary,tax,netpay); } else { taxrate=20; tax=(taxrate*salary)/100; netpay=salary-tax; printf("Gross Pay\tTax Rate\t Net Pay "); printf("$ %f\t$ %d(20%%)\t$ %f ",salary,tax,netpay); } } else { othour=hwork-40; otwage=hwage+(hwage/2); salary=(40*hwage)+(othour*otwage); if(salary<=600) { taxrate=15; tax=(taxrate*salary)/100; netpay=salary-tax; printf("Gross Pay\tTax Rate\t Net Pay "); printf("$ %f\t$ %d(15%%) \t$ %f ",salary,tax,netpay); } else { taxrate=20; tax=(taxrate*salary)/100; netpay=salary-tax; printf("Gross Pay\tTax Rate\t Net Pay "); printf("$ %f\t$ %d(20%%)\t$ %f ",salary,tax,netpay); } } return 0; }