princess33
| Subject: explain how to start the program and write the variables... Fri Jan 01, 2010 12:48 am | |
|
| i need a program having the following details-- to make an electricity bill -accept from user .....name ,consumer no.,no.of.units consumed,meter no. ,address,bill-------------------- HOW TO ACCEPT NAME...BLA BLA .....FROM USER???????????? PLZ EXPLAIN ME HOW TO START PLZ GIMME THE WHOLE PROGRAM ITSELF - USE IF ELSE /SWITCH CASE
UNITS RATE 50 UNITS Rs 1.45 per unit NEXT 50 UNITS Rs 2.80 ''
|
|
|
saif Active member
| Subject: Re: explain how to start the program and write the variables... Fri Jan 01, 2010 1:30 am | |
| - Quote :
- i need a program having the following details--
to make an electricity bill -accept from user .....name ,consumer no.,no.of.units consumed,meter no. ,address,bill-------------------- HOW TO ACCEPT NAME...BLA BLA .....FROM USER???????????? PLZ EXPLAIN ME HOW TO START PLZ GIMME THE WHOLE PROGRAM ITSELF - USE IF ELSE /SWITCH CASE
UNITS RATE 50 UNITS Rs 1.45 per unit NEXT 50 UNITS Rs 2.80 '' you are asking how to input .... are you in class 8th i mean that is one of the first things we are taught ....
No probs. even if u r in 8th or in any class ....
I can give you syntax of taking inputs in java
import java.io.*;
public class MainClass {
public static void main(String args[]) throws IOException{ InputStreamReader isr = new InputStreamReader(System.in); BufferedReader br = new BufferedReader(isr); int a=Integer.parseInt(br.readLine()); String Str=br.readLine(); Double d=Double.parseDouble(br.readLine()); } } |
|