Answer to Question #299676 in C for Silas

Question #299676

Write a program to prompt the user for hours and rate per hour to compute gross pay.

Enter hours:35

Enter rate:2.75

Pay:96.2


1
Expert's answer
2022-02-19T02:39:13-0500


#include<conio.h>
#include<stdio.h>
#include<stdlib.h>




int main(){
	int hours;
	float rate,pay;


	printf("Enter hours: ");
	scanf("%d",&hours);
	printf("Enter rate: ");
	scanf("%f",&rate);


	pay=hours*rate;
	printf("Pay: %.1f",pay);




	scanf("%f",&rate);


	return 0;
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS