0 like 0 dislike
14.8k views
請設計一個程式當使用者輸入一個分數(介於0-100間),程式會輸出相對應的等第

 90-100 => A

80-89 => B

70-79 => C

60-69 => D

0-59 => F

輸入範例1

100

輸出範例1

A

輸入範例2

59

輸出範例2

F
[Exercise] Coding (C) - asked in 作業 by (18k points)
ID: 12291 - Available when: Unlimited - Due to: Unlimited
1 flag
edited by | 14.8k views

131 Answers

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

int main()

{
*** **** ***** ** * *** num;


** * * * * ********* ** * * * * &num);


** *** * **** **** *** * * * ** * ** * * (num>=90)
* * ****** * * **
*** * ** * * * ** ** * ** * *** * * ** ***** ** ** *** *******
* *** * * ** *

 else if (num>=80)
* * *** *****
** ** * * * * * * * * ** * ***** ** *
**** ** ** ** * * *

 else if * **** * * ** * *

 {
* **** * * ** * * * * ** * * * * * ** * ***

 }

 else if * * * * * ** ** * **

 {
*** * ** ** * * * * ******* * ** **** ** *** * * ** **

}

else if * **** ********

{
* * * ** ** ** * * **** * ** * *** * * ** * *

}
* ** * * *** 0;

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

main( )

{
*** * *** * ** num;


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


* ** ** * *** ** >= 90)
**** *** * * *
* * * *** ** *** * ***
* * ** *
* * * ** * if (num >= 80)

  {
** * ****** * * * ** ** * *
** * *** *
* **** ** *** * if(num >= 70)
** * * * * *
* ** * ***** * ******* * * * **
* ***** *
** * * * * * if(num >= 60)
** **** *
** * * ** * ** * *** ***** *
** * *
** ** ** * * * if(num >= 50)
* * * ** *
* *** **** ** ***** ** * * ***
** ** * * * *
* * ** * * 0;

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

 int main()

{

      int num=0;
*** * * **** * ** * * ** * * * * * * * * * ***
***** * ** ** * * *** * **** ****** *
** * * ** * ********* * *** **** * * ** ****
** ** * ** ** ** * *** * *** **** if(num>=80)
* ** ** ** * ** *** *** ** * * *** * * ** * *****
** ** **** * * ******** ** *** if(num>=70)
* ** * ***** ** ****** ** * * * * *** ** * * **** * ** ***
*** * * * * * *** *** **** ****** ** * if(num>=60)
***** * ** ** * ** * * * ******* ** * * ** * ** ***
**** ** * **** * ** * *
* * * * ** * ** ** ** *** * * *** ***
*** * **** * *** *** *** * ***** ** 0;

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



int main()

{
* *** ** ***** z=0;
*** * * * ***** * * * ** * * * * *** * ** ** *


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


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


** * **** * **** ** if(z>79)


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


* * * * ** *** * if(z>69)


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


** ** *** *** * if(z>59)


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


* ** * ** ** if(z<60)


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


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



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

int main( )

{




*** * * ** grade;


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


** ** ** ( grade ** * 90)
*** *** ** * ** * * * **** * *******
* * ** if ( grade * * 80 )
**** *** * * ** **** * ** ** *** ** ***

else if ( grade *** 70)
* ** *** * ** * * ** ** * ** ***** **** ** *

else if ( grade * ** 60)
*** *** ** *** *** *** * *** ** * * ** *** *

else if(60 > grade )
* * *** * **** * * * * * ** ** ** ** *
* * * * * * * *** **** * ** * 0 ;



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



 int main()

{



    int score;



    scanf("%d", &score);



    if (score >= 90 )
* ***** * * * ** * ** **** ** * * ***** * *** * * * * *

    else

    {
***** ** * **** ***** ***** * * *** * ****** * * (score >= 80 )
** * * * **** ** ** * *** * * * * ***** * ** * ** ***** *** * ** ***
** ** * **** * * * ** **** **** *** *** * **** * ** **
* * * ** ** ** ** * * * * ** ** ** ****** ** * **




** ** **** * **** * *** ** * * * *** * * * * * * ** *** (score >= 70 )
** ** ** * ** ** * ********* * * * * * ** * *** ** * * ** * * * ***** * **** ** * * **
* ****** *** * * ** **** *** * **** * * **** * **** *** * **
* * * ** **** *** * * * **** ** * ** * * ** * * *** * *
** **** ** ** *** ****** * ** * * ** * *** * ******** ** **** * ***** ** ** ** ** (score >= 60 )
** ** ** * * **** ** *** ******* ** * * * **** *** * * * ** * **** * * * **** ** * * **** ** ** ** * *** * * * ** *** *** *
** * * ** *** ** * ** * * * ** * ** * * ** *** *** ********** **** * * *** *** *** * *
*** * *** ** * *** ** * *** *** * ***** *** * * ** * * * *** **** ** **** * *** *** *** * * ******* *** *** ** * *
* * * * * *** * * ** ** * * * * ** * ** **** ************ * ** * ***
***** * *** ** ** *** *** ** ** *** * * * ** **

    }



return 0;

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



int

{

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






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



else * ** * **






***** * * * * * *




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






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




** * * *






* ** * ** * **


****


* * * * *******










* 0;

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

main( )

{
****** * *** * num;


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


**** * ** >= 90)
** * ******
** * ** * ** * *** * *** * *** *
* ** *** ** *
** * * *** * if (num >= 80)

  {
* * * * *** *** *** * *

  }
* ** * **** ** if(num >= 70)
** *** *
* * * **** ** * * * *** ** ** *
** ** ***
* * * * *** * if(num >= 60)
** ** *** * **
*** * * ** ** * * ** **
** *** * *
*** ** ** * if(num >= 50)
* ** **
** * *** * **** ***** *** ** ***
**** * *
***** *** *** * 0;

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

#include <stdlib.h>

int main()

{

   int num;
* * ***** **** **** ** ** ** ** ** *

   if (num>=90)
****** * ***** ** * * * ** *

   else

   {
* * * ** *** * * * **** **** ** (num>=80)
** ****** * ** ** * ** * ** ***** * ******* * *


* ******** **** ** * * * *
* *** * * * * * *** * *** **
** * * * **** *** ** * * ** *** ***** ** * ****** * * (num>=70)
* * ** * * **** * *** ** * * * ** * * * ** * ** * * **** * ******
* ** ****** *** * ***** * ** *** *** * * * **** * **
* ** ** ** ** ***** ** * *** **** ** * ***** *** * * * ** *
****** * ***** ** ** * *** * * ** ** *** ** * *** * *** * * * * (num>=60)
* * * *** *** **** * *** * ** ****** ** *** * * *** * ** ** * * * * ****** ********* * *** *
* * * * ***** * * ** * * **** * ** * ** * ** * * * *** *** ** *** *** * ***
**** ** * ** * ****** ** ** * * * *** **** * * * * ** * ** ** ** ** ** *** * ** **
** ** ** ** ** ****** ***** *** ** ***** *** * ***
* * *** ****** * * ****** * *

   }

   return 0;

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

 int main()

{

      int num=0;
* * ** * ******** * ***** ** ***** **** ** ** score:");
* ** * * * ***** ***** **** * * * ** ** ** * * * ** ** ***** **** * *


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


* *** ** * *** * ** * * * *** if(num>=80)
** ** **** * * * * **** * * * ** ** ***** * * ****


* ** ** * ** ********* *** * * if(num>=70)
* * * *** **** * *********** ** * ** * **** *


* * *** **** * * ** ******* ** * * ** if(num>=60)
***** ******* * * * ***** **** * * * *** ** * *


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


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

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

Related questions

0 like 0 dislike
152 answers
[Exercise] Coding (C) - asked Oct 5, 2016 in 作業 by Shun-Po (18k points)
ID: 12295 - Available when: Unlimited - Due to: Unlimited
| 16k views
0 like 0 dislike
201 answers
[Exercise] Coding (C) - asked Oct 5, 2016 in 作業 by Shun-Po (18k points)
ID: 12293 - Available when: Unlimited - Due to: Unlimited
| 22.2k views
2 like 0 dislike
44 answers
[Exercise] Coding (C) - asked Nov 2, 2016 in 作業 by Shun-Po (18k points)
ID: 16861 - Available when: Unlimited - Due to: Unlimited
| 6.8k views
1 like 0 dislike
129 answers
[Exercise] Coding (C) - asked Oct 19, 2016 in 作業 by Shun-Po (18k points)
ID: 14119 - Available when: Unlimited - Due to: Unlimited
| 14.7k views
0 like 0 dislike
117 answers
[Exercise] Coding (C) - asked Oct 13, 2016 in 作業 by Shun-Po (18k points)
ID: 13581 - Available when: Unlimited - Due to: Unlimited
| 12.6k views
12,783 questions
183,442 answers
172,219 comments
4,824 users