You are on page 1of 1

ASSIGNMENT #7

#include <stdio.h>

int main() {

float hours;

float parts;

float totalcost;

printf("Enter amount of hours\n");

scanf("%f", &hours);

printf("Enter cost of parts\n");

scanf("%f", &parts);

totalcost= (hours*100) + parts;

if (totalcost < 150) {

printf("The Final Cost is $150");

else {

printf("The Total Cost is $%.f\n",totalcost);

return 0;

You might also like