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

int age=35;

                 if (age<=60)
                    printf(“You are young\n”);

               }

               ༛ก.      age<=60                              ข. You are young
                                     ุ
               ༛ค.      age=35༛ง. ถูกทกขຌอ
               4. ขຌอ฿ด฼ปຓนผลรันของ฾ปร฽กรมต຋อเปนีๅ༛
               #include<stdio.h>

               void main(){
                 int age=65;

                 if (age<=60)
                    printf(“You are young\n”);

                 else
                    printf(“You are old\n”);

               }
               ༛ก.      age<=60༛ข.                              You are young

               ༛ค.      age=65                               ง.  You are old
               5.༛ขຌอ฿ด฼ปຓนผลรันของ฾ปร฽กรมต຋อเปนีๅ༛ถຌา฿ส຋ขຌอมูล฼ขຌาเป฼ปຓน༛1 ฽ละ༛299

               #include <stdio.h>
               void main( ) {

                       int x, y;
                       printf(“Enter X :”);

                       scanf(“%d”, &x);
                       printf(“Enter Y :”);

                       scanf(“%d”, &y);
                       (x > y) ? printf(“X more than Y”) : printf(“X not more than Y”);

               }
                     ก. X not more than Y༛ข.                    Goodbye

               ༛ค.      X equal Y  ༛ง.                          X more than Y
               6. ขຌอ฿ด฼ปຓนผลรันของ฾ปร฽กรมต຋อเปนีๅ༛ถຌา฿ส຋ขຌอมูล฼ขຌาเป฼ปຓน༛39 ฽ละ༛39

               #include <stdio.h>

               main(){
                   int a, b;
                       printf("Please enter first number : ");




                                                                                                         2
   940   941   942   943   944   945   946   947   948   949   950