Toggle navigation
Courses
Questions
Tags
Users
第一次期中考_Question1
4
like
1
dislike
2.6k
views
某地的計程車費率計算方式為:前1.25公里的基本費70元,之後每200公尺收費5元。請設計一程式,由使用者輸入里程數,程式會計算相對應的車資輸出。
輸入說明:
會輸入一個包含小數點的數,該數不會大於float可儲存的範圍
輸出說明:
請輸出一個正整數,代標需要付的車資。
輸入範例
2.0
輸出範例
85
midterm
[Exam]
asked
Oct 27, 2017
in
2017-1 程式設計(一)AD
by
楊修俊
(
30k
points)
ID: 29380 -
Available when:
Unlimited
-
Due to:
2017-10-27 21:30
edited
Oct 27, 2017
by
Shun-Po
|
2.6k
views
comment
Please
log in
or
register
to add a comment.
31
Answers
0
like
0
dislike
Hidden content!
* ****** ** ** ****** ** *** * ** **** ** ** *
100/100
answered
Oct 27, 2017
by
linda
(
162
points)
ask related question
comment
Please
log in
or
register
to add a comment.
0
like
0
dislike
Hidden content!
* * ** * *** **** * * * * **** * * **
100/100
answered
Oct 27, 2017
by
410536015
(
236
points)
edited
Oct 27, 2017
by
410536015
ask related question
comment
Please
log in
or
register
to add a comment.
0
like
0
dislike
Hidden content!
*** * ** **
int * *
{
* *** float a;//miles
* ** ** * * int * * * c=money
* ** ** * * * * ** * ** ** input the * * * * *
* * * * * * ** * ** ********
** * ** ***
* * * * * * int * * * *
* *
** * * ***
* ** * * ** * * ** *** cost 70 * **** **
**** * * }
* *** * * ** * else * * ** **
* ***** * * * * *** * *
*** ** * *** * *** * c=b*5+70;
** ** ** * **** ***** * ** * ** * cost %d * * ****** *
** ** **
** * ** * * else if ** * *
** * ** *
* *** **
* ** * * ** * * ** *** **** +1;
***** * ** * * * ** * c=b*5+70;
*** *** * ** ** ** ** ***** * ** * cost %d * * * *
**** ** * }
* *** * ** ** * * **** * **
* * *** * return 0;
}
** ** *** ** *
* *
* * ** * ** ***
** * * *****
* **
100/100
answered
Oct 27, 2017
by
no name
(
185
points)
ask related question
comment
Please
log in
or
register
to add a comment.
0
like
0
dislike
Hidden content!
** * **** ** * *
int **
{
**** * * float a;//miles
* *** int ** c=money
*** * * ** * ***** ** * input the ** **
** * *** * * ** * ** * *** **
* *
* * ** int **
* * ** * *
** * ** * * ** **
* * * * * * * * * * * ** * * cost 70 *** * ** * *
* **** * }
* **** else ****
***** ** * * ** * * ** ** * ** * *
* *** * *** * * * * * * c=b*5+70;
* * ** ** *** ***** ** * ** * cost %d * * * * *
*** ** * **
* *** * *** else if * **
* * * ******
**** ***
* * ** * * * * * * * * +1;
** * * ***** *** * *** * c=b*5+70;
* ******* * * * * ** ** * * cost %d ** * * ***
** * * * }
* * ** * * ** ****** * *
*** *** **** * return 0;
}
** * ** **** **
* **
*** * * * ** * *
* * * *** *
** ** *****
100/100
answered
Oct 27, 2017
by
no name
(
185
points)
ask related question
comment
Please
log in
or
register
to add a comment.
0
like
0
dislike
Hidden content!
* **** * * * *
int * *
{
* * **** float a;
** * int b;
* **** *** * * * * * * *** * * *
* * * * ****** ** ***** *
* ** * * * ***
* ** int c;
* * * * * c=70+5*b;
* ** * ** *
* ****** *** * ** * *** ****** *** ** ***** **** *
*** ** ** * else **** * ** * *
****** * *** ** *** ***** * ** * ** * * * ** *
* ** * * return 0;
}
***** *
100/100
answered
Oct 27, 2017
by
花蓮彭于晏
(
150
points)
edited
Oct 27, 2017
by
花蓮彭于晏
ask related question
comment
Please
log in
or
register
to add a comment.
0
like
0
dislike
Hidden content!
** *** * * * *** * * * ** ** * *** * *** * * * *
100/100
answered
Oct 27, 2017
by
zxcv1025
(
196
points)
ask related question
comment
Please
log in
or
register
to add a comment.
0
like
0
dislike
Hidden content!
** * * *** **
int main()
{
* * ** * ** float x, y;
** * ** * ** * ** ****
* *** * * * * *
** ** **** * **** **** * * *
* * else * ** * **
* ** * * ** *
** *** ***** ** *** ***** * **** *
* * * ** * *** * * ** *
** * *** ** ** return 0;
* * * * * * * * ** * * * * * **
** ** ** return 0;
}
100/100
answered
Oct 27, 2017
by
cary
(
74
points)
ask related question
comment
Please
log in
or
register
to add a comment.
0
like
0
dislike
Hidden content!
*** ** * ** ** ******* * * * *
100/100
answered
Oct 27, 2017
by
Karmowy
(
160
points)
ask related question
comment
Please
log in
or
register
to add a comment.
0
like
0
dislike
Hidden content!
** * * * ** * * *** * ** * * ** * ** *
100/100
answered
Oct 27, 2017
by
張峰瑜
(
228
points)
ask related question
comment
Please
log in
or
register
to add a comment.
0
like
0
dislike
Hidden content!
** ** ** ** ** * * * *** * * *** *
100/100
answered
Oct 27, 2017
by
lee580346
(
192
points)
ask related question
comment
Please
log in
or
register
to add a comment.
Page:
« prev
1
2
3
4
next »
Welcome to Peer-Interaction Programming Learning System (PIPLS) LTLab, National DongHwa University
English
中文
Tiếng Việt
IP:172.70.38.61
©2016-2025
Related questions
3
like
0
dislike
12
answers
第二次期中考補考-第一題
[Exam]
asked
Dec 23, 2017
in
2017-1 程式設計(一)AD
by
楊修俊
(
30k
points)
ID: 38938 -
Available when:
2017-12-23 09:00
-
Due to:
2017-12-23 12:10
|
2.8k
views
midterm
2
like
0
dislike
0
answers
第一次期中考補考_Q4及其參考答案
[Resource]
asked
Nov 9, 2017
in
2017-1 程式設計(一)AD
by
楊修俊
(
30k
points)
ID: 31098 -
Available when:
Unlimited
-
Due to:
Unlimited
|
17
views
midterm
2
like
0
dislike
0
answers
第一次期中考補考_Q3及其參考答案
[Resource]
asked
Nov 9, 2017
in
2017-1 程式設計(一)AD
by
楊修俊
(
30k
points)
ID: 31097 -
Available when:
Unlimited
-
Due to:
Unlimited
|
14
views
midterm
2
like
0
dislike
0
answers
第一次期中考補考_Q2及其參考答案
[Resource]
asked
Nov 9, 2017
in
2017-1 程式設計(一)AD
by
楊修俊
(
30k
points)
ID: 31096 -
Available when:
Unlimited
-
Due to:
Unlimited
|
17
views
midterm
12,783
questions
183,442
answers
172,219
comments
4,824
users