Tuesday, 31 January 2017

EASSY PROGRAMMING OF BLUE J

A PROGRAMMING TO PRINT THE ELECTRICITY BILL 
if a=100 =200;
if a>100&&a<=300=200+1.00 per unit
if a>300&&a<=500=200+1.55 per unit
if a>500=200+2.10 per unit

public class electricity {

void main(int a)
{  double t=0;
    if(a<=100)
    {
        t=200;
    }
    if(a>100&&a<=300)
    {
        t=((a-100)*1.00)+200;
    }
    if(a>300&&a<=500)
    {
        t=(a-300)*1.55+(200*1.00)+200;
    }
    if(a>500)
    {
        t=(a-500)*2.10+(200*1.55)+200+(1*200);
    }
    System.out.print(t);

}}

this is an example related to this type of programing

No comments:

Post a Comment

HAY THAKYOU FOE VISIT

Program(python):-Find duplicates in an array (Geeks for geek problem)

QUESTION:- Given an array  a  of size  N  which contains elements from  0  to  N-1 , you need to find all the elements occurring more than o...