Answer to Question #205040 in C for Sarmad Ali

Question #205040

Write a C Program Management System to Rent a cycle on hourly basis


Per hour charges. Rs. 90 /hour




10 cycles


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-09T17:40:06-0400
#include<stdio.h>
int main(){
     int sum = 0;
	int clients [10][25]; //Declaring the a two dimension array to store clients and cycles
	
	
	for(int i = 0; i<10; i++){
	
		for(int j=0; j<25; j++){
			printf("Cycle %d: Hour for client %d\n", (i+1),(1+j));
			scanf("%d",&clients[i][j]);
		}
	}//
	for(int i = 0; i<10; i++){
	
		for(int j=0; j<25; j++){
			//printf("%d", clients[i][j]);
			sum = sum  + clients[i][j];
		
		}
	}
	//Getting total hours for all the cyclist 


		printf("\n Total hours is: %d", sum);
		printf("\n 	Monthly bill of all cyclists is: %d", sum * 90);
	


  
}

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