5 like 0 dislike

Write a program that reads the number of students who passed and failed in the exams and displays the percentages. For example:

輸入及格與不及格人數
輸出及格與不及格百分數

Example input:

12 8

Example output:

Success Ratio: 60%
Fail Ratio: 40%
[Normal] Coding (C) - asked in Introduction to Computer Programming I (C) by (9.8k points)
Available when: Unlimited - Due to: Unlimited

retagged by | 17 views

3 Answers

0 like 0 dislike
Hidden content!
** ** * *** * *

int main()
{
** * * * * ** * ** * * pass, fail;
* ** ** ** * *
* * * * *** *** * * * * *** **** &pass, &fail);
*** ** * * **** **
* * ** * ******** ** ** *** * * ** Ratio: * * ***** * ** * ** *
** ** ** ** * ***** * Ratio: * * * ** *** *** **
* * * ** ** ****

*** * * * *** ** 0;
}
answered by (-233 points)
0 0
Case 0: Wrong output
Case 1: Wrong output
0 like 0 dislike
Hidden content!
** ** ** *
* * * * *** ** ** ****

int main()
{
** *** ** * *** * ** pass, fail;
* * ** ** * **
*** * **** * ** * ** * *** * * ** &pass, &fail);
**** ** *** ** * *
*** * *** * ** *** *** ** Ratio: %.0lf%%\n", ** * *** * * *
* * *** *** ** ** ** Ratio: * * **** * *** **** ** ***
**** * ** * * **

** * * * **** * **** * 0;
}
answered by (-233 points)
0 0
Case 0: Wrong output
Case 1: Wrong output
0 like 0 dislike
Hidden content!
#include * * ** ***** *
int main(void)
{
* ** *** * a,b,c,d,e;
** *** * * ** * *** **** **** *** * ** * * * *
** * * ** ** * *
* * * *** ** ** ** **
* * * * ** ** * * **
** * ** ** ******* *** * *** * *** Ratio: %g%%\n",d);
*** * **** * ** * * *** * Ratio: %g%%",e);
* * * **** ***** ** 0;
}
answered by (-191 points)
0 0
Case 0: Correct output
Case 1: Correct output
Get it on Google Play Welcome to Peer-Interaction Programming Learning System (PIPLS) LTLab, National DongHwa University
English 中文 Tiếng Việt
IP:108.162.221.153
©2016-2019

Related questions

6 like 0 dislike
2 answers
[Normal] Coding (C) - asked Oct 16, 2017 in Introduction to Computer Programming I (C) by thopd (11.3k points)
Available when: Unlimited - Due to: Unlimited
| 32 views
5 like 0 dislike
0 answers
[Normal] Coding (C) - asked Oct 10, 2017 in Introduction to Computer Programming I (C) by thopd (11.3k points)
Available when: Unlimited - Due to: Unlimited
| 5 views
6 like 0 dislike
3 answers
[Normal] Coding (C) - asked Oct 16, 2017 in Introduction to Computer Programming I (C) by thopd (11.3k points)
Available when: Unlimited - Due to: Unlimited
| 9 views
8,033 questions
60,929 answers
33,033 comments
1,100 users