WAP to calculate the monthly telephone bills as per the following rule: Minimum Rs. 200 for upto 100 calls. Plus Rs. 0.60 per call for next 50 calls. Plus Rs. 0.50 per call for next 50 calls. Plus Rs. 0.40 per call for any call beyond 200 calls.
#include<iostream.h>#include<conio.h>void main(){int calls;float bill;cout<<"Enter number of calls : ";cin>>calls;if(calls<=100)bill=200;else if (calls>100 && calls<=150){calls=calls-100;bill=200+(0.60*calls);}else if (calls>150 && calls<=200){calls=calls-150;bill=200+(0.60*50)+(0.50*calls);}else{calls=calls-200;bill=200+(0.60*50)+(0.50*50)+(0.40*calls);}cout<<" Your bill is Rs."<<bill;getch();}
Output:
Enter number of calls : 190Your bill is Rs.250
can we calculate this method by using of any loop?
ReplyDeleteNo
ReplyDeleteI need this coding in java plz help me out
ReplyDeleteLaunch a phone line in any country or region without leaving your office virtual telephone line
ReplyDeleteTelephones are at the heart of every communication taking place within the premises of a business. To turn every https://voyance-par-telephone-amour.com/ into your prospect you need to be on top of your business communication. And that depends as much on good telephone systems as it is on experienced staff. It is always advisable to spend well in up-gradation or maintenance of communication equipment.
ReplyDeleteIf you are like most people, you use your phone internationally quite often. Whether you are traveling to a new country for the first time, or visiting family and friends in another part of the world, you want to make sure your phone is working properly, and that you have all of the communication tools you need. International Data SIM card
ReplyDelete