The Detailed Problem Is Describe Below.
A pharmaceutical company provides solution to complete a chemical process. Time and resources taken by chemical process depends on set of chemical compounds as an input conditions. Company charges on the following basis:
• If number of hours required to complete chemical process is less or equal to 48 then rates are rupees 2k per hour.
• If number of hours are more than 48 and less than 240, then the rates are up to 48 hours as serial number 1. For all the remaining rate is fixed at rupees 4k per hours.
• If number of hours are more than 240, then the rates are upto 240 hours as per serial number 2. For all remaining rate is fixed at rupees 10k per hour.
Write a program to automate the above process.
#include<stdio.h> void main() { int hour,charge; char comp[15]; printf("\nEnter Name Of compound "); gets(comp); printf("\nEnter Hour To Complete The Chemical Process "); scanf("%d",&hour); if(hour<=48) { charge=hour*2000; } else if(hour>48 && hour<240) { charge=hour*4000; } else { charge=hour*10000; } printf("\nCompound Name Is "); gets(comp); printf("\nApplied Charge Is %d\n",charge); }