Published: 16 Dec 2021 › Updated: 16 Dec 2021
Simple c++ coding to find out monthly telephone bill using while loop id if else statement.
.jpeg)
There must be the word "iostream" in <> after include in first line.
#include
#include<conio.h>
using namespace std;
int main()
{
int si,calls;
float bill;
while(true)
{
cout<<"enter the serial number"<<endl;
cin>>si;
if(si==0)
{
break;
}
cout<<"enter the number of calls"<<endl;
cin>>calls;
if(calls<=100)
{
bill=200;
}
else if(calls>100 && calls<=150)
{
calls=calls-100;
bill=200+(calls*0.60);
}
else if(calls>150 && calls<=200)
{
calls=calls-150;
bill=200+(50*0.60)+(calls*0.50);
}
else
{
calls=calls-200;
bill=200+(50*0.60)+(50*0.50)+(calls*0.40);
}
cout<<"the total bills tk ="<<bill<<endl;
}
getch();
}
Leave Simple c++ coding to find out monthly telephone bill using while loop id if else statement. to:
Read more #coding posts
Best Posts From steemibu351
We have not curated any of steemibu351's posts yet. But you can encourage our curation team to review posts by visiting them regularly and by referring other readers. Because we give priority to frequently read content.
More Posts From steemibu351
- It is high time for proper money management.
- Why we fall?
- A horrible game for Barcelona against Inter Milan.
- Yamaha RX-100: One of my most favourite motorcycle.
- Barca's new transfer window
- Food safety
- Manchester City and Halland's show against Nottingham Forrest.
- Our government is joking with our tea garden workers.
- Let's focus on Spanish La Liga
- What a big discrimination with tea workers in Bangladesh!