avatar
女征男 (DC)# Piebridge - 鹊桥
s*0
1
The manager of PG&E wants a program that calculates a customer's electric
bill. He will enter the current and previous meter readings. The program
should calculate and display the number of units of electricity used and the
total charge for the electricity. The charge for each unit of electricity
is $0.11. The program allows the user to display the electric bill for more
than one customer without having to run the program again. Use a sentinel
value to end the program.
Create 3 functions:
getInput: Gets the current and previous meter readings from the user. If
the user does not enter a sentinel value as the current reading, the
getInput function should prompt the user to enter the previous reading. To
be valid, the current reading must be greater than or equal to the previous
reading. The main function should not call the calcBill or displayBill
functions when the readings are not valid. Instead, it should display an
error message.
calcBill: Calculates both the number of units used and the total charge.
displayBill: Displays both the number of units used and the total charge.
Input Validation: Do not accept negative numbers for meter readings.
Sample run:
Current reading (negative number to end): 4000
Previous reading: 1000
Units used: 3000
Total charge: $330.00
Current reading (negative number to end): 4000
Previous reading: 5000
The current reading must be greater than or equal to the previous reading.
avatar
c*g
2
本人
★性别:女
★出生年份:1981
★所在地(起码给出state):DC
★职业情况(学生还是工作):工作
★简单的物理参数(身高/体重):164/51
★当前婚姻状态:从没结过婚
★联系方式(email/IM/站内): y******[email protected]
★星座 血型:天蝎 B
★爱好:阅读、写作、音乐、影视、旅游、游戏、动漫、美食、睡觉、做白日梦,
等等等......
★外表特征:典型江南女子
希望你
★性别:男
★出生年份:晚于1973
★职业情况(学生还是工作):工作
★简单的物理参数(身高/体重): >172/ 适中
★当前婚姻状态:从没结过婚 or 曾婚无子女
★星座:狮子座的还是算了吧
★性格:乐观开朗,有上进心、责任心和包容心,无严重大男子主义
★外表特征:对野兽派及邋遢不羁者无承受能力
缘是命 命是缘
avatar
L*e
3
你是哪部分有问题问?还是说要找人把完整code写出来你拿去交?

the
more
If

【在 s*********0 的大作中提到】
: The manager of PG&E wants a program that calculates a customer's electric
: bill. He will enter the current and previous meter readings. The program
: should calculate and display the number of units of electricity used and the
: total charge for the electricity. The charge for each unit of electricity
: is $0.11. The program allows the user to display the electric bill for more
: than one customer without having to run the program again. Use a sentinel
: value to end the program.
: Create 3 functions:
: getInput: Gets the current and previous meter readings from the user. If
: the user does not enter a sentinel value as the current reading, the

avatar
c*g
4
bless.
avatar
z*0
5
500刀 肯定有人给你做

the
more
If

【在 s*********0 的大作中提到】
: The manager of PG&E wants a program that calculates a customer's electric
: bill. He will enter the current and previous meter readings. The program
: should calculate and display the number of units of electricity used and the
: total charge for the electricity. The charge for each unit of electricity
: is $0.11. The program allows the user to display the electric bill for more
: than one customer without having to run the program again. Use a sentinel
: value to end the program.
: Create 3 functions:
: getInput: Gets the current and previous meter readings from the user. If
: the user does not enter a sentinel value as the current reading, the

avatar
I*D
6
典型的的江南女子是什么样的?
avatar
L*e
7
100我就做。。。

【在 z****0 的大作中提到】
: 500刀 肯定有人给你做
:
: the
: more
: If

avatar
a*p
8
姣花照水,弱柳扶风

【在 I*D 的大作中提到】
: 典型的的江南女子是什么样的?
avatar
m*d
9
楼主有点懒 :),女生?
avatar
f*l
10
这不是问题求解,这是作业求枪手。
avatar
j*8
11
这么简单的

the
more
If

【在 s*********0 的大作中提到】
: The manager of PG&E wants a program that calculates a customer's electric
: bill. He will enter the current and previous meter readings. The program
: should calculate and display the number of units of electricity used and the
: total charge for the electricity. The charge for each unit of electricity
: is $0.11. The program allows the user to display the electric bill for more
: than one customer without having to run the program again. Use a sentinel
: value to end the program.
: Create 3 functions:
: getInput: Gets the current and previous meter readings from the user. If
: the user does not enter a sentinel value as the current reading, the

avatar
t*0
12
goooood
avatar
s*c
13
lz奔一个 马上就有人写了

the
more
If

【在 s*********0 的大作中提到】
: The manager of PG&E wants a program that calculates a customer's electric
: bill. He will enter the current and previous meter readings. The program
: should calculate and display the number of units of electricity used and the
: total charge for the electricity. The charge for each unit of electricity
: is $0.11. The program allows the user to display the electric bill for more
: than one customer without having to run the program again. Use a sentinel
: value to end the program.
: Create 3 functions:
: getInput: Gets the current and previous meter readings from the user. If
: the user does not enter a sentinel value as the current reading, the

avatar
s*0
14
你先写一点,我奔一个上半身

【在 s******c 的大作中提到】
: lz奔一个 马上就有人写了
:
: the
: more
: If

相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。