SlideShare a Scribd company logo
1 of 15
Download to read offline
1.      ก
                                    ก                     ก"#$ก
ก % & % '( (      &         ) *    + , -)    ก% '
1.1 ก ก ก ก         !"
       1. ก - ก            ( ก+ %  %      )' ( _ ) (0 1      ก+
 () %       %       )' ก21
       2. + , ( $ %5'          ( %  ' ก6 ( $ )2ก &' A
 ( % 1 '% a
       3. %     ก    8+ &' $ @ -) % &' (' %(' ก
       4. ( & %        ) ก6
       5. 1 , ก6 (
              '                 +,
1.2 ! $
          +, &     ) * 3 ก);' %)ก                  ก     ()                (       2   () 8
<     = -ก ( ) ก &&   ) %%                          &% '( (                    '


    ! $                        %                                      ก ก
char             -128 0> 127                     ก
unsigned char    0 0> 255                        ก 1 '            %
int              -32768 0> 32767                 )   (   2
unsigned int     0 0> 65535                      )   (         2 1 '        %
short            -128 0> 127                     )   (        2 -66
unsigned short   0 0> 255                        )   (       2 -66 1 '            %
long             -2147483648 0> 2147483649       )   (           2 -66 (
unsigned long    0 0> 4294967296                 )   (          2 -66 ( 1 '        %
float            3.4 x 10-38 0> 3.4 x 1038       ) 8              ( ) %) ; 6 %)ก
double           3.4 x 10-308 0> 3.4 x 10308     ) 8              ( ) %) ; 12 %)ก
long double      3.4 x 10-4032 0> 3.4 x 104032   ) 8              ( ) %) ; 24 %)ก
1.3    ก           '      ()
        1.3.1 -66 1 1 ' ก % &                   )
&' printf (“2 x2 = %dn”,4)

       1.3.2 -66 2        6 " '( %( =                    +,
  -66 #define macro_name data;
       1.3      ก
  6 macro_name 1 & ก )
                  1.3.1
                                        & (              $ %5'
      data (“2 x2 = %dn”,4) )
           printf
 ( ' #define PI 3.14; &' ()* +,- .- / 01) ,)
                  1.3.2   2                          2 3 4&
             #define macro_name data;
            macro_name 1              / .-=* =>/ ?
        1.3.3 ' () 13
            data                  6 ("FG ก$& %)ก
 *'    !"
       const#define PI 3.14; = data;
               variable
 +$   variable & (-
      data           )
%      const x = a*b
2. ก    )       ,
                $       !$ % ก-
            ก                $& ก         (

2.1 %       $ ก (          $%. %


                %   $ ก            .,( /, -
                    +        addition         6(ก
                    -        subtraction      )6
                    *        multiplication    "
                    /        division         %
                    %        remainder        %   8+
2.1 %     $ ก   , +
        ก % a=3;b=2;


          %    $ ก         .,( /, -
              <      less than               ก('
              >      greater than           กก('
              <=     less than or equal      ก(' %    ' ก6
              >=     greater than or        กก(' %   ' ก6
                     equal
              ==     equal                  ' ก6
              !=     not equal            1 ' ' ก6
2.3 %    $ ก !$ % ก-

           %      $ ก              .,( /, -
               &&                    AND                 -)
               ||                     OR                 %
                !                    NOT



                %           4*          $     , % ก-
                                              $

        * -5 (X)        * -5 (Y)     !(X)     (X)&&(Y)    (X)||(Y)
            F               F          T          F          F
            F               T          T          F          T
            T               F          F          F          T
            T               T          F          T          T
3.          4 ' ( " ก ก8 - if
                   )
              (6 ; -66 if 3 )ก+" -66 if -66 if – else -) -66 if –
else if – else

3.1 ก )9!* -5   ' if
           if ก      %ก =                1         %1           '
  ก 1 -)(1 -% '   &; ' 1 % ก         1       2 ก21 '    1 %1
  -% '   &; ' 1
3.1.1 *' ก )             ' if
       *' 1 ก "%)           1 if 1
           if ( 1 )
                    ' ; (ก " 1        )
                  &; ' 1 ; (ก " 1        2)
       *' 2 ก "%)           1 if กก(' 1
           if ( 1 )
           {
             ก);'        ; (ก " 1       )
           };
                  &; ' 1 ; (ก " 1        2)
3.2 ก )9!* -5        ' if – else
            if – else ก          %ก 1                 %                 &;
  1 -)(1      &; ' 1 - '% ก 1     2 %                     &;   2 -)(1
     &; ' 1

3.2.1 *' ก    )         ' if – else
        *'   ก &          -66 if – else
                If (    1)
                        &; 1 (ก " 1        );
               else
                          &; 2 (ก "    1   2 );
                       &; ' 1 ;

#       % ก- ')        )ก     กก(' 1       &      %   {}ก      6
3.3 ก )9!* -5        ' if – else if – else
             if – else if – else ก             %ก 1      1       %
             &; 1 -)(           &; ' 1 % ก 1 1           2 % ( 6('
    1 2       % 1 '% ก 1 2            %             &;    2 -)(
     &; ' 1 % ก 1 2          2 % ( 6('        1 n        % 1 '% ก 1
n          %             &; n -)(           &; ' 1 % ก      1 n    2
 %              '%) else -)(          &; 0 1
3.3.1 *' ก   )     '   if – else if – else
        *'      -66ก       -66 if – else if – else
              if ( 1 1)
                     &; 1 ; (ก " 1 1    )
              else if ( 1 2)
                     &; 2 ; (ก " 1 2    )
              …..
              else
                     &; n ; ( ก %   ก 1         )
                  &; ' 1 ;
      % ก- ')      ) ก กก(' 1        &    %     {}ก   6
4.            4 ' )( " ก ก8 - switch
         ก (6 ; ก        & ก         +, ก       ก     if -)(
switch % ) ก 1 & (6 ; ก             -66     )   ก ก " ) กก
       ( ก ( ' &'            <)ก       -66 8      6% ก &     if -66
ก          =           ( 6             ( ก        %'       1 ก +,
  ก-66       switch %     )ก+" (       %$ (     6 '      (- %       $('
   ก6             case                          ก (6 ;          case
   - '% ก ( 6-)(1 ' ก6            )                     default (<;
        1 ') ก        default ก21 )
4.1 *' ก   )            ' -' ( ;               '   switch

               Switch { var / expression}
               {
               case ' 1 :           &;    1;
                                break ;
               case ' 2 :           &;    2;
                                    break ;
               case ' n :           &;    n;
                                    break ;
                                :         ;
               }
               1 ,. P       Q
ก<            -       () 1
*= (% ก !$ ! ก4             () 2
      ! $    <'ก
             4       () 4
     $(+$ก +    $ .8 () 5
       ?@         - () 6
    +      ( 4         () 8
    * $ ( C;(/ ( () 9
  $(+$ @         ($,     () 12
          !E .6/1

More Related Content

What's hot

Agni gundam 01-02
Agni gundam 01-02Agni gundam 01-02
Agni gundam 01-02
venkatesha9
 
Design for manufacturing selection
Design for manufacturing selectionDesign for manufacturing selection
Design for manufacturing selection
Vivek Parmar
 
Caso catenaria aprendiendo a innovar en la organizacion
Caso catenaria aprendiendo a innovar en la organizacionCaso catenaria aprendiendo a innovar en la organizacion
Caso catenaria aprendiendo a innovar en la organizacion
InnovacionSistematica
 
Giaotring corel draw-20050617_124103
Giaotring corel draw-20050617_124103Giaotring corel draw-20050617_124103
Giaotring corel draw-20050617_124103
lekytho
 
Italo calvino as cidades invisíveis
Italo calvino   as cidades invisíveisItalo calvino   as cidades invisíveis
Italo calvino as cidades invisíveis
morrosemcensura
 
Italo calvino-as-cidades-invisiveis-rev
Italo calvino-as-cidades-invisiveis-revItalo calvino-as-cidades-invisiveis-rev
Italo calvino-as-cidades-invisiveis-rev
Artetudo
 
Віта Кравчук “Малобюджетний SMM або навіщо вам тематичні спільноти в соцмереж...
Віта Кравчук “Малобюджетний SMM або навіщо вам тематичні спільноти в соцмереж...Віта Кравчук “Малобюджетний SMM або навіщо вам тематичні спільноти в соцмереж...
Віта Кравчук “Малобюджетний SMM або навіщо вам тематичні спільноти в соцмереж...
Lviv Startup Club
 

What's hot (19)

غُصي جو علاج
غُصي جو علاجغُصي جو علاج
غُصي جو علاج
 
Understanding Social Media’s Impact on Business
Understanding Social Media’s Impact on BusinessUnderstanding Social Media’s Impact on Business
Understanding Social Media’s Impact on Business
 
Dodo Newman Magazine / Spring 2010
Dodo Newman Magazine / Spring 2010Dodo Newman Magazine / Spring 2010
Dodo Newman Magazine / Spring 2010
 
Amma koochi
Amma koochiAmma koochi
Amma koochi
 
Redes
RedesRedes
Redes
 
Chinese new year safety
Chinese new year safetyChinese new year safety
Chinese new year safety
 
Agni gundam 01-02
Agni gundam 01-02Agni gundam 01-02
Agni gundam 01-02
 
الثالث ع السيرة
الثالث ع السيرةالثالث ع السيرة
الثالث ع السيرة
 
Rothke computer forensics show 2010
Rothke   computer forensics show 2010Rothke   computer forensics show 2010
Rothke computer forensics show 2010
 
Tp3
Tp3Tp3
Tp3
 
Techtop informacion-general
Techtop informacion-generalTechtop informacion-general
Techtop informacion-general
 
Tesis de doctoradoportaguardia
Tesis de doctoradoportaguardiaTesis de doctoradoportaguardia
Tesis de doctoradoportaguardia
 
Design for manufacturing selection
Design for manufacturing selectionDesign for manufacturing selection
Design for manufacturing selection
 
Caso catenaria aprendiendo a innovar en la organizacion
Caso catenaria aprendiendo a innovar en la organizacionCaso catenaria aprendiendo a innovar en la organizacion
Caso catenaria aprendiendo a innovar en la organizacion
 
Giaotring corel draw-20050617_124103
Giaotring corel draw-20050617_124103Giaotring corel draw-20050617_124103
Giaotring corel draw-20050617_124103
 
ใบความรู้ที่ 10 เรื่องไวรัสคอมพิวเตอร์
ใบความรู้ที่ 10 เรื่องไวรัสคอมพิวเตอร์ใบความรู้ที่ 10 เรื่องไวรัสคอมพิวเตอร์
ใบความรู้ที่ 10 เรื่องไวรัสคอมพิวเตอร์
 
Italo calvino as cidades invisíveis
Italo calvino   as cidades invisíveisItalo calvino   as cidades invisíveis
Italo calvino as cidades invisíveis
 
Italo calvino-as-cidades-invisiveis-rev
Italo calvino-as-cidades-invisiveis-revItalo calvino-as-cidades-invisiveis-rev
Italo calvino-as-cidades-invisiveis-rev
 
Віта Кравчук “Малобюджетний SMM або навіщо вам тематичні спільноти в соцмереж...
Віта Кравчук “Малобюджетний SMM або навіщо вам тематичні спільноти в соцмереж...Віта Кравчук “Малобюджетний SMM або навіщо вам тематичні спільноти в соцмереж...
Віта Кравчук “Малобюджетний SMM або навіщо вам тематичні спільноти в соцмереж...
 

Viewers also liked (6)

Pescare
PescarePescare
Pescare
 
The BEP: IVC Coffee Poster Project
The BEP: IVC Coffee Poster ProjectThe BEP: IVC Coffee Poster Project
The BEP: IVC Coffee Poster Project
 
Planificador de proyectos
Planificador de proyectosPlanificador de proyectos
Planificador de proyectos
 
Test de inteligencia 1
Test de inteligencia 1Test de inteligencia 1
Test de inteligencia 1
 
Comparativa Android 3.1
Comparativa Android 3.1Comparativa Android 3.1
Comparativa Android 3.1
 
Hawaii breakout
Hawaii breakoutHawaii breakout
Hawaii breakout
 

งาน#1

  • 1.
  • 2. 1. ก ก ก"#$ก ก % & % '( ( & ) * + , -) ก% ' 1.1 ก ก ก ก !" 1. ก - ก ( ก+ % % )' ( _ ) (0 1 ก+ () % % )' ก21 2. + , ( $ %5' ( % ' ก6 ( $ )2ก &' A ( % 1 '% a 3. % ก 8+ &' $ @ -) % &' (' %(' ก 4. ( & % ) ก6 5. 1 , ก6 ( ' +,
  • 3. 1.2 ! $ +, & ) * 3 ก);' %)ก ก () ( 2 () 8 < = -ก ( ) ก && ) %% &% '( ( ' ! $ % ก ก char -128 0> 127 ก unsigned char 0 0> 255 ก 1 ' % int -32768 0> 32767 ) ( 2 unsigned int 0 0> 65535 ) ( 2 1 ' % short -128 0> 127 ) ( 2 -66 unsigned short 0 0> 255 ) ( 2 -66 1 ' % long -2147483648 0> 2147483649 ) ( 2 -66 ( unsigned long 0 0> 4294967296 ) ( 2 -66 ( 1 ' % float 3.4 x 10-38 0> 3.4 x 1038 ) 8 ( ) %) ; 6 %)ก double 3.4 x 10-308 0> 3.4 x 10308 ) 8 ( ) %) ; 12 %)ก long double 3.4 x 10-4032 0> 3.4 x 104032 ) 8 ( ) %) ; 24 %)ก
  • 4. 1.3 ก ' () 1.3.1 -66 1 1 ' ก % & ) &' printf (“2 x2 = %dn”,4) 1.3.2 -66 2 6 " '( %( = +, -66 #define macro_name data; 1.3 ก 6 macro_name 1 & ก ) 1.3.1 & ( $ %5' data (“2 x2 = %dn”,4) ) printf ( ' #define PI 3.14; &' ()* +,- .- / 01) ,) 1.3.2 2 2 3 4& #define macro_name data; macro_name 1 / .-=* =>/ ? 1.3.3 ' () 13 data 6 ("FG ก$& %)ก *' !" const#define PI 3.14; = data; variable +$ variable & (- data ) % const x = a*b
  • 5. 2. ก ) , $ !$ % ก- ก $& ก ( 2.1 % $ ก ( $%. % % $ ก .,( /, - + addition 6(ก - subtraction )6 * multiplication " / division % % remainder % 8+
  • 6. 2.1 % $ ก , + ก % a=3;b=2; % $ ก .,( /, - < less than ก(' > greater than กก(' <= less than or equal ก(' % ' ก6 >= greater than or กก(' % ' ก6 equal == equal ' ก6 != not equal 1 ' ' ก6
  • 7. 2.3 % $ ก !$ % ก- % $ ก .,( /, - && AND -) || OR % ! NOT % 4* $ , % ก- $ * -5 (X) * -5 (Y) !(X) (X)&&(Y) (X)||(Y) F F T F F F T T F T T F F F T T T F T T
  • 8. 3. 4 ' ( " ก ก8 - if ) (6 ; -66 if 3 )ก+" -66 if -66 if – else -) -66 if – else if – else 3.1 ก )9!* -5 ' if if ก %ก = 1 %1 ' ก 1 -)(1 -% ' &; ' 1 % ก 1 2 ก21 ' 1 %1 -% ' &; ' 1
  • 9. 3.1.1 *' ก ) ' if *' 1 ก "%) 1 if 1 if ( 1 ) ' ; (ก " 1 ) &; ' 1 ; (ก " 1 2) *' 2 ก "%) 1 if กก(' 1 if ( 1 ) { ก);' ; (ก " 1 ) }; &; ' 1 ; (ก " 1 2)
  • 10. 3.2 ก )9!* -5 ' if – else if – else ก %ก 1 % &; 1 -)(1 &; ' 1 - '% ก 1 2 % &; 2 -)(1 &; ' 1 3.2.1 *' ก ) ' if – else *' ก & -66 if – else If ( 1) &; 1 (ก " 1 ); else &; 2 (ก " 1 2 ); &; ' 1 ; # % ก- ') )ก กก(' 1 & % {}ก 6
  • 11. 3.3 ก )9!* -5 ' if – else if – else if – else if – else ก %ก 1 1 % &; 1 -)( &; ' 1 % ก 1 1 2 % ( 6(' 1 2 % 1 '% ก 1 2 % &; 2 -)( &; ' 1 % ก 1 2 2 % ( 6(' 1 n % 1 '% ก 1 n % &; n -)( &; ' 1 % ก 1 n 2 % '%) else -)( &; 0 1
  • 12. 3.3.1 *' ก ) ' if – else if – else *' -66ก -66 if – else if – else if ( 1 1) &; 1 ; (ก " 1 1 ) else if ( 1 2) &; 2 ; (ก " 1 2 ) ….. else &; n ; ( ก % ก 1 ) &; ' 1 ; % ก- ') ) ก กก(' 1 & % {}ก 6
  • 13. 4. 4 ' )( " ก ก8 - switch ก (6 ; ก & ก +, ก ก if -)( switch % ) ก 1 & (6 ; ก -66 ) ก ก " ) กก ( ก ( ' &' <)ก -66 8 6% ก & if -66 ก = ( 6 ( ก %' 1 ก +, ก-66 switch % )ก+" ( %$ ( 6 ' (- % $(' ก6 case ก (6 ; case - '% ก ( 6-)(1 ' ก6 ) default (<; 1 ') ก default ก21 )
  • 14. 4.1 *' ก ) ' -' ( ; ' switch Switch { var / expression} { case ' 1 : &; 1; break ; case ' 2 : &; 2; break ; case ' n : &; n; break ; : ; } 1 ,. P Q
  • 15. ก< - () 1 *= (% ก !$ ! ก4 () 2 ! $ <'ก 4 () 4 $(+$ก + $ .8 () 5 ?@ - () 6 + ( 4 () 8 * $ ( C;(/ ( () 9 $(+$ @ ($, () 12 !E .6/1