Hello,
Super new to C.
Can someone explain why the following runs, but does not perform the arithmetic operators? (Note: some of the variables initialized are for a later part of the program.)
Code:#include <stdio.h> int main(void) { float hoursWorked; float hourlyWage; float basePay; float otPay; float grossPay; float netPay; float taxBurden; float baseTax = 0.15; float progressiveTax = 0.20; basePay = hoursWorked * hourlyWage; otPay = (hoursWorked - 40) * hourlyWage * 0.5; grossPay = basePay + otPay; printf("This program will calculate your Gross Pay, Net Pay, and Tax Burden based on your hours worked and wage.\n\n"); printf("Please enter hours worked this week and your hourly wage separated by a comma.\n\n"); scanf("%.2f , %.2f", hoursWorked, hourlyWage); if (hoursWorked == 0) printf("No pay for you, slacker!"); if (hoursWorked <= 40 && !0) printf("Your gross pay is: %.2f", basePay); if (hoursWorked >40) printf("Your gross pay is: %.2f", grossPay); return 0; }