Sunday, October 14, 2018

Electricity bill in c++ language(BY CLEVER_PROGRMAING)

#include<iostream>
#include<conio.h>
int totalbill(int x);  // TOTALBILL FUNCTION.....

using namespace std;


int unit,bill;

int totalbill(int x)
{
unit =x;

if (unit<200)
      {
      bill= 200*2;
      return(bill);
                }
   else
    if (unit<400)
   {
      bill = 200*2 + (unit-200)*4;
      return(bill);
                     }
   else
   if (unit<600)
   {
     bill = 200*2 + 200*4 + (unit-400)*6;
     return(bill);
                   }
   else
   if (unit<800)
  {
bill= 200*2 + 200*4 + 200*6 + (unit-600);
return(bill);
                     }
    else
   if (unit<1000)
  {
bill = 200 *2 + 200*4 + 000*6+ 200*8 + (unit-800)*10;
return(bill);
                     }
   else
   if (unit>1000)
  {
  bill = 200*2+ 200*4 + 200*6 + 200*8 + 200*10 + (unit-1000)*12;
  return(bill);
                    }
             }
int main()
{
int unit,bill,x;
cout<<"enter  the your electricity unit";

cin>>unit;//

//   workprogreesing ................................
cout<<totalbill(unit);
getch();

}

Arrays in Solidity Programming Language.

Arrays Solidity supports both generic and byte arrays. It supports both fixed size and dynamic arrays. It also supports multidimensional ...