1 喜歡 0 不喜歡
14.7k 瀏覽

Write the C program that receives the number of coffee cups and teacups. The program shows the TOTAL price after user press Enter. The price for one cup of coffee is $35, one cup of tea is $25 

寫一個計算咖啡跟茶的總計

Example input:

3 2

Example output:

155
[練習] Coding (C) - 最新提問 分類:Chapter 2: C Fundamentals | 用戶: (9.9k 分)
ID: 25482 - 從幾時開始: 無限制 - 到幾時結束: 無限制

修改於 用戶: | 14.7k 瀏覽

73 個回答

0 喜歡 0 不喜歡
內容已隱藏
#include<stdio.h>

int main()
{
**** ** * * * * ** cup_tea;
** *** * * ** * **** * cup_coffee;
* ****** ** * * * ** * total_price;
* **** * * ** ** **** **** * *** ******* * ** **** ** * * **
** ** ** *** * * ******* ** * * * *** * *
***** ** *** *** * ** * ****** ** * **
*** ** * ** *** * 0;
}
最新回答 用戶: (82 分)
0 0
Case 0: Correct output
Case 1: Correct output
Case 2: Correct output
Case 3: Correct output
0 喜歡 0 不喜歡
內容已隱藏
* * * ** * * *
int main ()
{
* * * coffee,tea,total;
*** ** *
* *** ** **** ** * * ** * * * * **** *** ***
** * *** *
* **** * *** * (coffee*35) + (tea*25);
* * ** ****
*** * ** *** * * *** * * *
* * ** ** ** 0;
}
最新回答 用戶: (-167 分)
0 0
Case 0: Correct output
Case 1: Correct output
Case 2: Correct output
Case 3: Correct output
0 喜歡 0 不喜歡
內容已隱藏
*** * * * * **
int main()
{
* **** ** **** * coffee,tea,total;
***** ** ** ** * ***** **** *** * &coffee,&tea);
** * ** * ** * *** tea*25;
* ** * *** ** * **** * * *** **
* ** * ** * *** * ** ** * *
** * *** * * ** ** ***** * *** ** * * * total);
* **** * ** * ** ** * 0;

}
最新回答 用戶: (-254 分)
0 0
Case 0: Correct output
Case 1: Correct output
Case 2: Correct output
Case 3: Correct output
0 喜歡 0 不喜歡
內容已隱藏
int main(void)
{
* ** ** * * * *** ** * * coffee,tea,total;
* * *** * ** ** * **** *** * * ** * &coffee,&tea);
*** ****** * ** * * ** tea*25;
**** * ** * ** * *
* * **** * *** * ** ***
** *** * ** *** * ** * *** **** *** * total);
* * ** **** * ** *** * 0;

}
最新回答 用戶: (-254 分)
0 0
prog.c: In function 'main':
prog.c:4:5: warning: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
     scanf("%d%d", &coffee,&tea);
     ^~~~~
prog.c:4:5: warning: incompatible implicit declaration of built-in function 'scanf'
prog.c:4:5: note: include '<stdio.h>' or provide a declaration of 'scanf'
prog.c:8:5: warning: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
     printf("%d", total);
     ^~~~~~
prog.c:8:5: warning: incompatible implicit declaration of built-in function 'printf'
prog.c:8:5: note: include '<stdio.h>' or provide a declaration of 'printf'
0 喜歡 0 不喜歡
內容已隱藏
* * ** *****
int main ()
{
** *** ** coffee,tea,total;
*** * * * **
* * ******* **** * * ** **** ****
** * ** *
* *** ******* (coffee*35) + (tea*25);
* * * *
* ** * ** * ** * **** * *
*** * ****** **** 0;
}
最新回答 用戶: (-167 分)
0 0
Case 0: Wrong output
Case 1: Wrong output
Case 2: Wrong output
Case 3: Wrong output
0 喜歡 0 不喜歡
內容已隱藏
**** * **** * **
int main(){
*** * * * ** ****** * a,b,total;
* * ** * * * ** * **** ** * ** ****** * * * * **
* * ** * *** * * *** * * * *
*** ** * * ** * * * *** ******** **
return 0;}
最新回答 用戶: (-32 分)
0 0
Case 0: Correct output
Case 1: Correct output
Case 2: Correct output
Case 3: Correct output
0 喜歡 0 不喜歡
內容已隱藏
******* ** * * * **
int main(){
**** * * *** * * ** *** * a,b,total;
**** * ** ** ** *** * * * ** *** ** ***
*** * ** * ** ** * * ** **
* * * **** ** **** * * *** ** * *
return 0;}
最新回答 用戶: (-32 分)
0 0
Case 0: Correct output
Case 1: Correct output
Case 2: Correct output
Case 3: Correct output
0 喜歡 0 不喜歡
內容已隱藏
* ** ** * * **
int main(){
** ** * ** ** * * ** * a,b,total;
** *** ***** * * *** * ** * ** * **** *** * ** *
* ** *** * * **** * * ** ** **
** * * ** * *** * * ** ** * ** * *
return 0;}
最新回答 用戶: (-32 分)
0 0
Case 0: Correct output
Case 1: Correct output
Case 2: Correct output
Case 3: Correct output
0 喜歡 0 不喜歡
內容已隱藏
* ** **** **
int main(){
*** * * * * ** a,b,total;
* * ** ***** *** ** * ** ********** * * **** *
* * * * **** ** * * * **
* * * * ** * ** ** ** *** * * *** *******
return 0;}
最新回答 用戶: (-32 分)
0 0
Case 0: Correct output
Case 1: Correct output
Case 2: Correct output
Case 3: Correct output
0 喜歡 0 不喜歡
內容已隱藏
* * ******* * **
int main(){
* ****** * * * ** * * **** a,b,total;
******** * ** ** * ** * *** ****** * **** ****
*** * * *** * * * **** * * *
* * * * ** ** ** * ***** ** * * ** * ** **** * *
return 0;}
最新回答 用戶: (-32 分)
0 0
Case 0: Correct output
Case 1: Correct output
Case 2: Correct output
Case 3: Correct output
Welcome to Peer-Interaction Programming Learning System (PIPLS) LTLab, National DongHwa University
English 中文 Tiếng Việt
IP:104.23.243.109
©2016-2026

相關問題

4 喜歡 1 不喜歡
61 回答
[練習] Coding (C) - 最新提問 9月 28, 2017 分類:Chapter 2: C Fundamentals | 用戶: thopd (12.1k 分)
ID: 25484 - 從幾時開始: 無限制 - 到幾時結束: 無限制
| 12.7k 瀏覽
2 喜歡 0 不喜歡
50 回答
[練習] Coding (C) - 最新提問 9月 28, 2017 分類:Chapter 2: C Fundamentals | 用戶: thopd (12.1k 分)
ID: 25483 - 從幾時開始: 無限制 - 到幾時結束: 無限制
| 11.8k 瀏覽
12,783 問題
183,442 回答
172,219 留言
4,824 用戶