Page 947 - เตรียมสอบครูผู้ช่วยคอมพิวเตอร์_compressed
P. 947

#include <stdio.h>

               main(){
                       int a=20;

                       int b=6;
                       if((a>0) && (b>a)){

                             printf(“Correct !”);
                       }}

               ༛ก.      6 < 20༛ข.                               20 & 6

                     ค. Correct !༛ง.                            20 > 6
               9. ขຌอ฿ด฼ขียนผิด

                     ก. if (number>=10)
                            net=number+(number*2)/10;

                       else;

                            net=number;
               ༛ข.      if (score>=80)

                            grade='4';
                          else if (score>=60)

                            grade='3';

               ༛ค.      if(score < 0 || score > 100)
                           printf("Enter score 0 - 100 \n");

                       else if(score >= 80)

               ༛ง.      if (score>=50)
               10. ༛ขຌอ฿ด฼ขียนผิด

               ༛ก.      case 'a' :

                           printf("Excellent!");
                         break;

               ༛ข.      case 'b' :
                         printf("Good!");

                     ค. switch (A);
               ༛ง.      switch (getchar())









                                                                                                         4
   942   943   944   945   946   947   948   949   950   951   952