Answer to Question #143201 in C for harsh verma

Question #143201
In a company, the customers had to wait in rows due to the technical issues in the company’s software. Now the company has decided that it will reimburse some amount from their paid amount to the customers as compensation since they had to wait for long.
 The software takes time as input in minutes. This time is to be converted into hours and for each complete hour an amount of Rs. 50 is to be reimbursed.
For example, for a person who waited for 2 hours 6 minutes, the amount to be reimbursed is Rs. 100, and also for 2 hours 40 minutes, Rs. 100 is to be returned
HINT: calculate the number of hours and then multiply the number of hours with 50.
1
Expert's answer
2020-11-09T00:11:45-0500
#include <stdio.h>

int GetReimburses(int minutes)
{
    int hours = minutes / 60;

    return hours * 50;
}

int main(int argc, char* argv[])
{
    printf("Reimburses for 126 minutes is %d\n", GetReimburses(126));
    printf("Reimburses for 160 minutes is %d\n", GetReimburses(160));
    
    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