0 like 0 dislike
8.1k 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 | 8.1k views

131 Answers

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

#include <stdlib.h>



int main()

{
* *** * * *** ***** * ** grade;
**** * ** * *** * *** * ** *** * *** * ** ** &grade);




**** ** * * * * ** * (grade >= 90 )
*** ** * * * *** ****** * ** ** * * * * * * **** * * * *
**** *** ** **** ** * if(grade >= 80)
** * * ***** ** * * * *** ***** * ** * *
**** * ***** * *** *** if(grade >= 70)
**** ** * * * ** *** * * ** *** ****** * * * * **** **
* * ** ** * * ** * if(grade >= 60)
* * *** * ** * * * * * * *** * ** **** *** **** ***** * ** *
******** * *** * * ** *
***** ******* ** *** * * * * * * ** *** **** * *** * ** ** **
*** * ****** ****** ** * 0 ;

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

#include * *** *





int main()

{
* ** * **** * * * ** a=0  ;
* * ** * * * * * ** * **** *** **** * * * ** * *
** *** * * ** * * **** * * **** *
****** ** ***** * >= 90)
* *** *** * * *** * * * **
** * * *** * * if(a >= 80 )
* ** ** *** ***** *** * ** *
** ***** ** * ** ** if(a >= 70)
* ** * * ***** *** * ***** * ** *
*** ** * ** * * * if(a >= 60 )
**** * **** *********** ** *** *
** * * * * ***
* * * *** * ** * *** * ** * ** *
* ** **** ** * * ** 0;

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

#include<stdlib.h>

int main()

{

 int a = 0;

 printf("請輸入成績");

 scanf("%d",&a);

 if(a>=90)
* * * ** ** ** * * *** * **** * **

    else
* * * * *** ***** ** * * ****** *** * ** ** *
* ** *** * * * ** * * ** *** * * * * * ** * ****** * * * ******* **
* * * * ** * * * ** ** **** * * * * * * *
* ** *** * * * ** ** * **** * * ** * ** ** * * ** * ** * *** ****
* * ***** *** *** ** ****** * **** ** * * ****** ** ** * * ** *** ** ** * *** ** *
* * **** * * * * * **** ** ** * * ** ** ** ** * ** **** * * * * * ** * *** * * ** **
*** ** * ** * * ** * *** ** ******** * * ** ** * ** * * * *** *** * ** *** **
** * * *** * * ***** ** * *** ** *** * * * * * * * * ** ******* * * *** * *
* *** * ** * * * * *** **** *** **** * * * * * * *** * * * * * * * ***** * * * *
*** ** * ** * * **** ***** * * * ** ** ** **** * ** *** ** *** * ** * ** * * *** ** * ****** **





  return 0;



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



int main ()

{

   int num1 ;


*** *** ** * ***** ** ("enter a score") ;


* ***** *** * ("%d" ,&num1);



   if( num1 >=90 ) {
** ** * ******* *** * ***** * ("A");

   }
** *** *** ** **** *** ** * * * ** * * if ( num1 >=80 ){
* *** * *** * ** *** *** *** ********* *** **** ** * ** ** * ****** *** ("B");
** * ** ******* * *** ****** ** ** * *
* * * ** ** *** **** * ***** **** ** ** ********* * ** * * ** * * if ( num1 >=70 ) {
* ** * * ** * *** * ** * ***** ** **** ***** * **** **** *** ** * * * * * ("C");
* * * * * * ****** ** * * * *** * **** *** ** * * * * *
* ** ** * **** **** * * ** * ** *** * **** * * *** * * ** * *** * * * **** ** * * * * * if ( num1 >=60 ){
** ** *** *** **** ** * **** ** ** * **** * * *** * *** * * ** * ** ** * **** **** * *** * * **** ****** * * ** *** ("D");
** ** *** ** ** ** * * * ** * * * ** ***** * * * * **** *** ** * *** * * * * * ***
**** ** *** * * **** * *** *** *** * * ** **** ** **** * *** * ** ** ***** ******* * {
* * * * **** * ** ****** ******** * * * * * **** ** ** *** ** ** ** *** ***** * * **** ** *** *** * * * ******* ***** *** * ("F");
* ** ** * * *** **** ** ** *** * * * *** * * * ** ** * * * * * ******* ***** *** * * *** ** ** * * ** ** * **
* * ***** * * 0;

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



int main( )



{
***** ***** ** grade;
* * * **** * *** *** " Enter yor grade : " );
* * * *** *** * *** * *** * ** );


* *** * *** * *** grade >= 90 )
* * * ** *** ****
* *** * ******** * ** A *** *
* **** * * * **


***** ** * ** * * if ( grade >= 70 )
* * **** * *** **
**** **** * * * * * ****** B ******
** * * ** * * ** **


**** ** * * ***** * if ( grade >= 60 )
* * * ** *** * * *
*** ** * * *** ** *** * * * C ** * *
* * * * ***** * *


* ** ***** **
*** * * ***
*** ** * * * ******** ***** F ** **
* * **** * *


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

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

#include * ** * * ** * *



int main()

{
* * ***** ** ***** i;
**** *** * * *** * * * * ** ** * ***** * ** \n");
* **** ** ** * * * * ** ****** * * * * ** ** ** * *
* ** **** ** *** * ***** * ******** * * ***
******* * * ** *** ** ** ** * * * ** * * * ***


**** ** * * * *** (i >= 90)
* * * * * * * * ** * **** * * ** * * ***** **** \n\n");
** *** * ***** * *** * if (i >= 80)
** * *** * **** * *** ** * ** ** * * **** \n\n");
** ****** ** * * ** *** if (i >= 70)
* **** * * ******* *** ****** ** **** * * * ** \n\n");
** **** ** **** * **** if (i >= 60)
**** * ** * ** * ** ** *** ** * * * ** ** * * * \n\n");
* ** ** **** **** * ** if (i >= 0)
*** ***** *** * * ** * * ** ******** * ** * *** *** \n\n");


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



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

#include * **** ** ***





int main()

{
*** * * * * ** ** ** a  ;
* * ** * * ** ** * *** ** **** ** * ** *** *
*** ** * ** * * * ** ****** ***** ***
* * ** **** ** >= 90)
* ** * * * ** ** ** * *** *** *
* * ** * * *** * if(a >= 80 )
*** * *** * * ** * * * * ** ** ***
****** * * * ** * * * if(a >= 70)
* * * * ** ****** * * * * *
* * ***** ** * *** if(a >= 60 )
** * **** ******** * ** ******
* ** ** *** * *
*** ***** * *** ***** * **
*** *** * *** ****** 0;

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

#include <stdlib.h>

int main()

{


* * *** * * ** * * ** ** * * num=0;
***** ** **** ** * * *** ** ** * *** enter your score:");
* ** * *** ** *** * ** *** * *** *



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










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



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



int ****

{

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

{
** * **

}

else * ***** * ** *

{
* * ** ** *

}



else ******* ** ** * *

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

}



else * **** ** *

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

}

else

{
* * * * **

}


***** 0;

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



int main()

{
**** ** ***** ** * * score=0;


** ** *** * * ** * *** * your score:");
** * *** * ****** ** * * *****


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


*** * ** * ** **** if(score>=80) * *** *** *** *** * *****


** ** ** * * *** ***** ** if(score>=70) * ** ****** ***** *


*** * ** * ** ** **** * ** * * *** if(score>=60) * * *** ** * **


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

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

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
| 9.4k 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
| 12.1k 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
| 3.9k 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
| 8.5k 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
| 7.3k views
12,783 questions
183,442 answers
172,219 comments
4,824 users