1 like 0 dislike
9.6k views

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
[Exercise] Coding (C) - asked in Chapter 2: C Fundamentals by (9.9k points)
ID: 25482 - Available when: Unlimited - Due to: Unlimited

edited by | 9.6k views

73 Answers

0 like 0 dislike
Hidden content!
#include<stdio.h>

int main(){
********* *** *** ** * * a,b;
* *** **** ** * *** * ** * * * ***** * * * *
*** * * * ** * * * * * ***** **** * * * ***
****** ** * * ** ***** * * ** 0;

}
answered by (-116 points)
0 like 0 dislike
Hidden content!
** * * * * *** ***

int main()

{

int * ** * ****


** **
** * *




** * ** * * the * of ** * * *
* * *** * ** * ** * *** *


* * **** the number of ****
* ** ** **** ** *** ** *


**** ** * * **


* * * * * * *


* * * = 35;

tea = 25;



total = * ***


** ***** * ** ** * *** ** ** *


** ** ** * * * * * * **


*** 0;

}
answered by (-249 points)
0 like 0 dislike
Hidden content!
#include <stdio.h>

#include *** *** **





int main()

{
* * **** * ******** a,b,TOTAL;
**** * *** * ** ** **** ** ** * *** * * *** *** **
* ***** ** ** *** * * * * *
* * * *** ** *** ** ********* * ** ***** *** * *
** * * * * ** *** *** * * ** 0;

}
answered by (-255 points)
0 like 0 dislike
Hidden content!
#include <stdio.h>

#include **** * **



int main(void)

{
* ** *** **** ** a,b,TOTAL;
* * *** * ** ** **** *** ** ** * *** ** * ** * *
* *** ** *** * ** ** ** ****
****** *** ** * ** ** * * ******
*** ** * *** ** * *** * 0;

}
answered by (-127 points)
0 like 0 dislike
Hidden content!
#include <stdio.h>

#include * ** * ***



int main()

{
* * * * * * ** a,b,c,d,sum;
*** * ** * *** * ***
* * * *** ** ** **** *** ***
*** *** ** ****** ** ** ** *** ** * ** * * * ***
**** ** *** * * **** ** **
* * * ** ** * *** * * ** *** * * * * * **
******* * **** ** * * *** 0;

}
answered by (-108 points)
0 like 0 dislike
Hidden content!
#include ***** * **** ***

int main (void)


* *
*** * * * * *** ** ** ** * ** *** x, y, totalprice;
* * **** * * ** * * ** ********* * * * & x, * * ** *
*** **** *** ** ** * ** * ** * = x*35 + y*25;
** * ** * ** * * *** * * ** * * * *** * ** *
* ** * ***** * ******** ** 0;


answered by (-281 points)
0 like 0 dislike
Hidden content!
** * *** * * ** * *

int main()

{

int ********* ***


*** **
* *




* ** **** * the *** of * ****
* **** *** **** * ** * ** ******


* ** the number of ** * *
* * *** *** * * * *


*** ** * *


* * **** ** * *** **


** ** = 35;

tea = 25;



total = * *


* * *** ***** ** ** ** *** * *** **


**** * ** * ** * ** ** **


* 0;

}
answered by (-249 points)
0 like 0 dislike
Hidden content!
#include * *** * * * * *

#include * ***** *

#define * 35

#define **** * 25



int * ****

{
** * * * ** ** * * ** * *** a,b,TOTAL;
** * *** * * * * * ***** ** * *** * ** * ** * ****** * *
** * ** *** *** ** * * * * + b*25;
* ** **** **** *** * ** * * *** *** * ** *
* ***** * *** * * 0;

}
answered by (-284 points)
0 like 0 dislike
Hidden content!
#include *** *** *******



int main()



{


* *** ** ***** ** * * c,t,totalprice;


** * **** * * * ***** * * ** * * * * * ** **


* * * *** ** *** *** * ** ** *


** * **** * **** * * ** * **


* ** **** ** * ** **** 0;



}
answered by (-249 points)
0 like 0 dislike
Hidden content!
#include <stdio.h>

#include * * * **



int main()

{
** ** ** ** * ** * * a,b,c,d,sum;
*** * * * ** *** *** **
* **** *** * ** * **
* * ** **** * *** * * ** *** *** * * * * * * ** **
** ** * * ***** *** **** * *
* * * ** * * *** * * * * * ** * * **
** * ** ***** * ** ** * * *** 0;

}
answered by (-258 points)
Welcome to Peer-Interaction Programming Learning System (PIPLS) LTLab, National DongHwa University
English 中文 Tiếng Việt
IP:108.162.241.33
©2016-2025

Related questions

4 like 1 dislike
61 answers
[Exercise] Coding (C) - asked Sep 28, 2017 in Chapter 2: C Fundamentals by thopd (12.1k points)
ID: 25484 - Available when: Unlimited - Due to: Unlimited
| 8.3k views
2 like 0 dislike
50 answers
[Exercise] Coding (C) - asked Sep 28, 2017 in Chapter 2: C Fundamentals by thopd (12.1k points)
ID: 25483 - Available when: Unlimited - Due to: Unlimited
| 7.4k views
12,783 questions
183,442 answers
172,219 comments
4,824 users