Complete IIT AIEEE ICSE ISC PMT help forum
This is a free help Forum for Indian Students.
Complete IIT AIEEE ICSE ISC PMT help forum
This is a free help Forum for Indian Students.
Complete IIT AIEEE ICSE ISC PMT help forum
Would you like to react to this message? Create an account in a few clicks or log in to continue.
Complete IIT AIEEE ICSE ISC PMT help forum

Complete help forum for students preparing for icse iit aieee cbse pmt and other related exams.Stay updated about all 2011 exams.
 
HomeHome  PortalPortal  SearchSearch  Latest imagesLatest images  RegisterRegister  Log in  India NewsIndia News  
Keywords
computer CASE UNION 2007 paper papers graph physics 2010 question SELECT science 2006 prelim 2004 2009 YEAR RESULT CLASS ICSE
Latest topics
» Nitration of aniline - IIT JEE 2018 Advanced - solved
check for errors ??? EmptyFri Jun 08, 2018 2:34 am by adianadiadi

» Diamagnetic - Paramagnetic - Ni(CO)4, [Ni(CN)4]2- and [NiCl4
check for errors ??? EmptyFri Apr 06, 2018 1:05 am by adianadiadi

» IIT JEE chemistry solved interactive question paper
check for errors ??? EmptySun Oct 29, 2017 12:11 pm by adianadiadi

» IIT JEE 2015 SOLVED QUESTION PAPER
check for errors ??? EmptyWed Oct 19, 2016 1:44 pm by adianadiadi

» IIT JEE chemistry solved questions
check for errors ??? EmptySat Jul 18, 2015 6:15 pm by adianadiadi

» General Description of Chinese Market for Foaming Agent ADC
check for errors ??? EmptyFri May 09, 2014 2:09 pm by happybaicaitou

» How to get Lowest Cost MBBS Admission?
check for errors ??? EmptyMon Feb 24, 2014 6:39 pm by MENTOR 2014

»  girl boy vashikaran specialist agori baba ji +91-9461165
check for errors ??? EmptyTue Jan 21, 2014 6:00 pm by krshastri

»  STRONG LOST LOVE SPELL +91-9461165176
check for errors ??? EmptyTue Jan 21, 2014 6:00 pm by krshastri

Top posters
abhas
check for errors ??? Vote_lcapcheck for errors ??? Voting_barcheck for errors ??? Vote_rcap 
Anu..i luv icse...:)
check for errors ??? Vote_lcapcheck for errors ??? Voting_barcheck for errors ??? Vote_rcap 
G-7
check for errors ??? Vote_lcapcheck for errors ??? Voting_barcheck for errors ??? Vote_rcap 
siya
check for errors ??? Vote_lcapcheck for errors ??? Voting_barcheck for errors ??? Vote_rcap 
Candy
check for errors ??? Vote_lcapcheck for errors ??? Voting_barcheck for errors ??? Vote_rcap 
jOhNy
check for errors ??? Vote_lcapcheck for errors ??? Voting_barcheck for errors ??? Vote_rcap 
Apurva
check for errors ??? Vote_lcapcheck for errors ??? Voting_barcheck for errors ??? Vote_rcap 
WinRrule
check for errors ??? Vote_lcapcheck for errors ??? Voting_barcheck for errors ??? Vote_rcap 
ambili
check for errors ??? Vote_lcapcheck for errors ??? Voting_barcheck for errors ??? Vote_rcap 
saif
check for errors ??? Vote_lcapcheck for errors ??? Voting_barcheck for errors ??? Vote_rcap 



Search if you can't find it here

check for errors ???

View previous topic View next topic Go down
AuthorMessage
princess33




check for errors ??? Vide
PostSubject: check for errors ??? check for errors ??? EmptyMon Jan 04, 2010 6:51 pm

my program is not compiling plz check if there are any errors check for errors ??? Kopfschuettel check for errors ??? Confused
import java.io.*;
public class bill
{
double amt;
String cust_name;
double bill;
InputStreamReader ir = new InputStreamReader(System.in);
BufferedReader br = new BufferedReader(ir);
System.out.println("APCPDCL");
System.out.println("Electricity bill");
System.out.println("enter the following and pay the bill");
System.out.println("*******************");
System.out.println("ENTER CUSTOMER'S NAME :");
String cust_name =br.readLine();
System.out.println()
System.out.println("enter customer's address :");
String add=br.readline();
System.out.println()
System.out.println("enter meter no.")
String mtr_no=br.readline()
String mtr_no =Double.parseDouble(br.readLine(mtr_no));
System.out.println();
System.out.println("enter no. of units consumed");
String u=br.readline();
String u=Double.parseDouble(br.readLine());
}
public void display throws IOException
if(u<=50)
bill=(double)(1.45*u);
else if((u>50)&&u<=100));
bill=(double)(1.45*50+(u-50)*2.80);
else if((u>100)&&(u<=200));
bill=(double)(50*1.45)+(50*2.80)+(u-100*3.05);
else if((u>200)&&(u<=300));
bill=(double)(50*1.45)+(50*2.80)+(100*3.05)+(u-200*4.75);
else if((u>300)&&(u<=400));
bill=(double)(50*1.45)+(50*2.80)+(100*3.05)+(100*4.75)+(u-300*5.50);
}
else
{
System.out.println("invalid entry")
}
total amount= bill+650;
System.out.println("------------------------------------");
System.out.println("monthly rental=Rs 250 /-");
System.out.println()
System.out.println(you need to pay RS+"bill" );
System.out.println()
System.out.println(" Due Date is 30/2/10");
System.out.println("Note: pay before the due date or you will be charged fine");
System.out.println ("THANK YOU");
}
}
Back to top Go down
abhas
Active member
Active member
abhas


check for errors ??? Vide
PostSubject: Re: check for errors ??? check for errors ??? EmptyMon Jan 04, 2010 9:45 pm

U had not added semi colons after System.out.println etc. try this(i have not tried it on java as i don't have it installed. if error is still there then tell me in which line u r getting it and what does it say)

import java.io.*;
public class bill
{
double amt;
String cust_name;
double bill;
InputStreamReader ir = new InputStreamReader(System.in);
BufferedReader br = new BufferedReader(ir);
public void accept()throws IOException

{
System.out.println("APCPDCL");
System.out.println("Electricity bill");
System.out.println("enter the following and pay the bill");
System.out.println("*******************");
System.out.println("ENTER CUSTOMER'S NAME :");
String cust_name =br.readLine();
System.out.println();
System.out.println("enter customer's address :");
String add=br.readline();
System.out.println();
System.out.println("enter meter no.");

double mtr_no =Double.parseDouble(br.readLine(mtr_no));
System.out.println();
System.out.println("enter no. of units consumed");

double u=Double.parseDouble(br.readLine());
}
public void display ()
{
if(u<=400)
{
if(u<=50.0)
amt=(1.45*u);
else if((u>50.0)&&(u<=100.0))
amt =(1.45*50.0+((u-50.0)*2.80));
else if((u>100.0)&&(u<=200.0))
amt =(50*1.45)+(50*2.80)+((u-100.0)*3.05));
else if((u>200.0)&&(u<=300.0))
amt=(50*1.45)+(50*2.80)+(100*3.05)+((u-200*4.75));
else if((u>300.0)&&(u<=400.0))
amt=(50*1.45)+(50*2.80)+(100*3.05)+(100*4.75)+((u-300)*5.50));
}
else
{
System.out.println("invalid entry");
}
double bill = amt + 250.0;
System.out.println("------------------------------------");
System.out.println("monthly rental=Rs 250 /-");
System.out.println();
System.out.println("you need to pay RS"+bill );
System.out.println();
System.out.println(" Due Date is 30/2/10");
System.out.println("Note: pay before the due date or you will be charged fine");
System.out.println ("THANKYOU!");
}
}
Back to top Go down
sahilsweetypie




check for errors ??? Vide
PostSubject: Re: check for errors ??? check for errors ??? EmptyTue Nov 09, 2010 12:58 pm

hey bhai__________
tune saare methods bana to diye hain bt tumne usko main class me call hi nahi kiya hai. thatz y errors display ho rhe hain_______
main right prog bana kar tujhe kuch der me reply kar dunga_____________
Back to top Go down
Sponsored content




check for errors ??? Vide
PostSubject: Re: check for errors ??? check for errors ??? Empty

Back to top Go down

check for errors ???

View previous topic View next topic Back to top
Page 1 of 1

Permissions in this forum:You cannot reply to topics in this forum
Complete IIT AIEEE ICSE ISC PMT help forum :: Computer :: Computer Question answers-