avatar
Untitled

Guest 37 30th Nov, 2019

CSHARP 0.95 KB
                                           
                         using System;
class ElectBillex1//UpperCamelcase
{
static void Main(string[] args)
 {
	 double rs;
float units;
int cusid;
string name;
Console.WriteLine("Enter the Units");
units=float.Parse(Console.ReadLine());
Console.WriteLine("Enter the CustomerId");
cusid=int.Parse(Console.ReadLine());
Console.WriteLine("Enter the CustomerName");
name=Console.ReadLine();

if(units<=199)
   {
   rs=units*1.20;
   Console.WriteLine("Rupees {0} ",+rs);
   }
	else if(units<400)
	  {
		
		 rs=((units-399)*1.50)+(199*1.20);
		Console.WriteLine("Rupees {0} ",+rs);
	  }
	 else if(units<600)
	   {
		 rs=((units-599)*1.80)+(400*1.50)+(199*1.20);
		 
		 Console.WriteLine("Rupees {0} ",+rs);
	   }
	   else if(units>600)
	    {
		   rs=((units-1199*2.00)+(600*1.80+400*1.50+199*1.20));
		   Console.WriteLine("Rupees {0} ",+rs);
		   
	    }
 
 }
                      
                                       
To share this paste please copy this url and send to your friends
RAW Paste Data
Recent Pastes