Program
<p dir="auto">A program is set of instruction given by user to computer to perform a specific task.computer program, in depth intend or else process in lieu of solving a riddle by means of a computer; supplementary specifically, an unambiguous, well thought-out string of computational advice indispensable near attain such a solution.
<h1>Program Body
<pre><code>#include<iostream>
<pre><code>#include <string>
<pre><code>#include<math.h>
<pre><code>using namespace std;
<pre><code>class ebill{
<pre><code>private:
<pre><code> float bill,punits,newu,un,up;
<pre><code>public:
<pre><code> void caluclation();
<pre><code>};
<pre><code>void ebill::caluclation(){
<pre><code>cout<<"Please Enter the units of last month"<<endl;
<pre><code>cin>>punits;
<pre><code>cout<<"Please Enter the current units"<<endl;
<pre><code>cin>>newu;
<pre><code>cout<<"Please Enter the price of units in your country"<<endl;
<pre><code>cin>>up;
<pre><code>un=newu-punits;
<pre><code>if(un<300){
<pre><code> bill=up*un;
<pre><code> cout<<"your total bill is "<<bill<<endl;
<pre><code>}
<pre><code>else if(un>300){
<pre><code> bill=(up*un*5)/100;
<pre><code> cout<<"your total bill is "<<bill<<endl;
<pre><code>}
<pre><code>else {
<pre><code> cout<<"There is problem with your units please recheck them."<<endl;
<pre><code>}
<pre><code>}
<pre><code>int main(){
<pre><code>ebill obj;
<pre><code>obj.caluclation();
<pre><code>}
<h1>Written in C++
<p dir="auto"><img src="https://images.hive.blog/768x0/https://steemitimages.com/0x0/http://www.pngall.com/wp-content/uploads/2016/05/C-PNG-Clipart.png" srcset="https://images.hive.blog/768x0/https://steemitimages.com/0x0/http://www.pngall.com/wp-content/uploads/2016/05/C-PNG-Clipart.png 1x, https://images.hive.blog/1536x0/https://steemitimages.com/0x0/http://www.pngall.com/wp-content/uploads/2016/05/C-PNG-Clipart.png 2x" />
<p dir="auto"><a href="https://steemitimages.com/0x0/http://www.pngall.com/wp-content/uploads/2016/05/C-PNG-Clipart.png" target="_blank" rel="nofollow noreferrer noopener" title="This link will take you away from hive.blog" class="external_link">Source
<h1>Made in Visual C++ IDE
<p dir="auto"><img src="https://images.hive.blog/768x0/https://steemitimages.com/0x0/http://domoticx.com/wp-content/uploads/Microsoft-Visual-C-logo.png" srcset="https://images.hive.blog/768x0/https://steemitimages.com/0x0/http://domoticx.com/wp-content/uploads/Microsoft-Visual-C-logo.png 1x, https://images.hive.blog/1536x0/https://steemitimages.com/0x0/http://domoticx.com/wp-content/uploads/Microsoft-Visual-C-logo.png 2x" />
<p dir="auto"><a href="https://steemitimages.com/0x0/http://domoticx.com/wp-content/uploads/Microsoft-Visual-C-logo.png" target="_blank" rel="nofollow noreferrer noopener" title="This link will take you away from hive.blog" class="external_link">Source
<h3><em> I hope it was helpful and you learned something from it, Thanks