Answer to Question #204784 in C for Sarmad Ali

Question #204784

Write a C Program to Rent a cycle on hourly basis

Per hour charges. Rs. 90 /hour


10 bicles

25 clients

90 per hr charges

Reports

Monthly bill of all cyclists

Every client don't take cycle on rent at daily basis but Can take regular and more than one hour daily


1
Expert's answer
2021-06-09T04:24:39-0400
#include<stdio.h>
float total_numbers(int hour){
	return 90 * hour;
}
int main(){
	int hours_array [25];
	int i;
	for(i = 0; i< 25; i++){
		printf("Enter number of hours took by client  %d cycling in this month:\t\t", (i+1));
		
		scanf("%d", &hours_array[i]);
	}


	int sum = 0;
	for(i = 0; i<25; i++){
		sum += hours_array[i];
		
	}
	printf("The total number of hours clients cycled:\t %d\n", sum);
	printf("\n");
	printf("Monthly bill for all cyclists is:\t %f\n", total_numbers(sum));
	
}

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