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
#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);
}
Comments
Leave a comment