Question: why aren't the if and else if staments working in my C program the only thing that is showing up is the else statement? /
why aren't the if and else if staments working in my C program the only thing that is showing up is the else statement?
SuperCalcVc by Sarah Place
#include
int mainvoid
printfJayhawk Supercomputer Usage Calculator by Sarah Place";
int hoursUsed minutesUsed secondsUsed;
printfEnter hours used as a whole number ;
scanfd&hoursUsed;
printfEnter minutes used as a whole number ;
scanfd&minutesUsed;
printfEnter seconds used as a whole number ;
scanfd&secondsUsed;
int totalSeconds hoursUsed minutesUsed secondsUsed;
printfTotal Seconds of Usage dtotalSeconds;
float totalHours floathoursUsed floatminutesUsedfloatsecondsUsed;
printfTotal Hours of Usage ftotalHours;
float totalDays floathoursUsedfloatminutesUsedfloatsecondsUsed;
printfTotal Days of Usage ftotalDays;
float rate f;
if totalSeconds
rate f;
else if totalSeconds
rate f;
else if totalSeconds
rate f;
else if totalSeconds
rate f;
else
rate f;
printfRate Per Second frate;
printfThanks for Using Jayhawk Supercomputer!";
return ;
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
