princess33
| Subject: computer project HELP needed in writing IF ELSE programs???? Sun Dec 27, 2009 2:47 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
- USE IF ELSE /SWITCH CASE
UNITS RATE 50 UNITS Rs 1.45 per unit NEXT 50 UNITS Rs 2.80 '' next 100units rs. 3.05 '' next 100 units rs.4.75 "
Last edited by princess33 on Sun Dec 27, 2009 6:08 pm; edited 1 time in total |
|
princess33
| Subject: Re: computer project HELP needed in writing IF ELSE programs???? Sun Dec 27, 2009 2:53 am | |
| ////////////////////// |
|
abhas Active member
| Subject: Re: computer project HELP needed in writing IF ELSE programs???? Sun Dec 27, 2009 1:50 pm | |
| //input name ,consumer no.,no.of.units consumed,meter no. ,address,bill consumed in //variable n,c,u,mn,ad of proper data type
if(u<=50) bill=(double)1.45*u; else if(u<=100) bill=(double)(1.45*50+ (u-50)*2.80); .... ....
use this logic to make the whole prog. take variable bill as double data type....
Make the complete program and if there is any error then post ur code here... |
|
sahilsweetypie
| Subject: Re: computer project HELP needed in writing IF ELSE programs???? Tue Nov 09, 2010 1:10 pm | |
| listen, first start from all the inputs then continue throughout with the if statement n then use else if n at last place an else________ u r done ____ jst compile n enjoy__________ |
|
Sponsored content
| Subject: Re: computer project HELP needed in writing IF ELSE programs???? | |
| |
|