SlideShare a Scribd company logo
ก           C
                    ก        ก           C !" # ก $#!% "            ก&
' ( ( ( ก ) * + #, ก ( - (. -*                        C $!% /" / 0
 ก1 $ % header file           C ' ก1 $ % 0 2) () ) ก3 *.h * &
       ( (     #, ก ( /" /        "ก ก "       # 0ก )" " (.6% /" # 0ก )
 /" / ) % " ! "            ( * )' )*% ก /           & !" " "!/
0*       ก )! * $#
7.1 ก               (standard functions)
            #, ก ( - (. -*        C $!% /" / 0 ก1 $ %
     header file        C ' ก1 $ % 0 2) () ) ก3 *.h * & )( *% ก %
    ก ! *% 6% ก            "6 header file ! ก           '" %
' ( #include<header file.h> /% )              * *% / # 0ก )
    )      % ก (*% ก $!% 8( ก ) * + #, ก (
   - .6%. -* C compiler /" / 9( %.6% % $# " ก /" # 0ก ) %ก
 /" # 0ก ) ! ก0 "/             '           "ก ก ) * +          :$
    ก : (library functions)
ก )*+ ( ก              /%     ก <9 ก ) * + (
    #, 0 "ก %        "&       8( )! * $#
7.1.1 ก                   (mathematic functions)
                #, ก ( %         ก ' = '=-*> * 0 ก (      %
   ก #          *% %' ( #include <math.h> 0 ก "6* *% /
 # 0ก ) 0 * 0# ( % ก #                *% )
   -! (type) #, double ( ก. 9? ($!% ก ก #          $!%'
  ก / /% )6 #, double ก
    ก                              !
acos(x)           asin(x)            atan(x)
sin(x)            cos(x)           tan(x)
sqrt(x)            exp(x)            pow(x,y)
log(x)            log10(x)           ceil(x)
floor(x)           fabs(x)
1) ก   acos(x)
       #, ก ( %' = ' arc cosine / x !" ( x #, ' )3)
    " !" (radian)
            6#0
  acos(x);
       2) ก asin(x)
       #, ก ( %' = ' arc sine / x !" ( x #, ' )3)
  " !"
        6#0
  asin(x);
      3) ก atan(x)
       #, ก ( %' = ' arc tan / x !" ( x #, ' )3)
  " !"
          6#0
  atan(x);
4) ก    sin(x)
       #, ก ( %'   = ' sine /    x !" ( x #, ' )3)     " !"
      6#0
  sin(x);

        5) ก cos(x)
       #, ก ( %' = ' cosine /      x !" ( x #, ' )3)    "
 !"
       6#0
  cos(x);

      6) ก tan(x)
#, ก ( %' = ' tan /      x !" ( x #, ' )3)    " !"
       6#0
   tan(x);
9( ' ) /%        ก %     ก acos(x), asin(x), atan(x), sin(x),
cos(x) 0         tan(x) ) ก"-( / %>ก # 0ก )* " * $# "# $ก                                 %&'
   7.1 0 !      ก %     ก acos(x), asin(x), atan(x), sin(x),
cos(x) 0         tan(x)
*         math1.c          */
#include<stdio.h>                                                  /*        ! ( 1 */
#include<math.h>                                                   /*        ! ( 2 */
#include<conio.h>                                                  /*        ! ( 3 */
void main(void)                                                      /*        ! ( 4 */
{                                               /*   ! ( 5 */
   double r, pi = 3.141592654;                            /*        ! ( 6 */
   r = pi/180;                                             /*         ! ( 7 */
   clrscr();                                               /*        ! ( 8 */
   printf("%fn",asin(r));                                    /*        ! ( 9 */
   printf("%fn",acos(r));                                    /*       ! ( 10 */
   printf("%fn",atan(r));                                     /*       ! ( 11 */
   printf("%fn",sin(r));                                      /*       ! ( 12 */
   printf("%fn",cos(r));                                     /*       ! ( 13 */
   printf("%fn",tan(r));                                      /*       ! ( 14 */
   printf("nPress any key back to program ..."); /*     ! ( 15 */
   getch();                                                /*         ! ( 16 */
}                                                 /*  ! ( 17 */
())*+ , -. ก"# $ก
' ?- " # 0ก )
          ก # 0ก )* " ( 7.1 ) ?- "ก            / # 0ก ) ( 'N & $!%!
     ! ( 9 ' ( printf("%fn",asin(r)); ก ' = ' arc sin / * 0# r !" r #, )3)         "
  !" 0 0 ! . 9? ($!% ก        9
     ! ( 10 ' ( printf("%fn",acos(r));      ก ' = ' arc cosine / * 0# r !" r #, )3)
    " !" 0 0 ! . 9? ($!% ก        9
     ! ( 11 ' ( printf("%fn",atan(r)); ก ' = ' arc tan / * 0# r !" r #, )3)           "
  !" 0 0 ! . 9? ($!% ก        9
     ! ( 12 ' ( printf("%fn",sin(r)); ก ' = ' sine / * 0# r !" r #, )3)        " !"
0 0 ! . 9? ($!% ก        9
     ! ( 13 ' ( printf("%fn",cos(r)); ก ' = ' cosine / * 0# r !" r #, )3)           "
  !" 0 0 ! . 9? ($!% ก        9
     ! ( 14 ' ( printf("%fn",tan(r)); ก ' = ' tan / * 0# r !" r #, )3)        " !"
0 0 ! . 9? ($!% ก        9
     ! ( 15 0 16 9-)9/% ' ) %ก!'" ! & 9( ก 6 # 0ก ) 0 "3! ' ! &     ก! enter ก /% 6
 # 0ก )                                   /*    ! ( 17 */
7) ก       sqrt(x)
          #, ก ( % ' ก ( 2 (square root) / ' ' (   * 0# x !" ( x      *% #, ' ' ( -!
* / * 0# )' $)*-!
                (
         6#0
     sqrt(x);
        8) ก exp(x)
          #, ก ( % ' ex !" ( x #, ' ' ( * 0# (     % #, ' "กก   /   e !" ( e )' # ) =
2.718282
           6#0
     exp(x);
9) ก pow(x,y)
 #, ก ( % ' xy
 !" (
x #, ' ' ( * 0# ( % #, * + 8( *% )' ) กก >6 "
y #, ' ' ( * 0# ( % #, ' "กก
 6#0
    pow(x, y);
1.2 ก ก(" ก * ก (character functions) #, ก ( %ก /% )6 ) -! #, single char
                                                              (
( % ( 1 byte)         0 ก ( % ก #              *% %' ( #include<ctype.h> 0 ก "6
* *% / # 0ก )         )      "ก % ก #      $!% ก ก(" ก * ก ( 'N         isalnum(ch),
isalpha(ch), isdigit(ch), islower(ch), isupper(ch), tolower(ch), toupper(ch),
isspace(ch), isxdigit(ch)

        1.3 ก ก(" ก * - (string functions) #, ก ( ก /% )6 -! * - (string)
                                                         %
 !"ก ( % ก #               *% %' ( #include<string.h> 0 ก "6* *% / # 0ก ) "ก
      "ก % ก #        $!% ก ก(" ก * - ( 'N       strlen(s), strcmp(s1,s2)
, strcpy(s), strcat(s1,s2)

      1.4 ก ( $# ( %        "&
 ก   clrscr( ) #, ก ( %     ก /% )6 ก ก     90 text mode
 ก   gotoxy(x,y) #, ก       ( ' ( %* * 0
                              %           (cursor) ' ( ($#" * 0      (   3$ %   9
 ก   sizeof(x) #, ก (     %*     / !/ * 0# x )/ !ก( Byte
2. ก ( /" / (user defined functions) ก ( /" /                        '        "ก
 # 0ก )" " '        / # 0ก ) ( /" / 9( % )              $!% " ! "       ( * )' )
*% ก         .6% /" # 0ก )     C -") "ก # 0ก )" " : ก :              .6% ( /"
 # 0ก )     # ' '            0         -ก -") "ก : # 0ก )" ": " $ ก1* )
 # 0ก )" "        ก ก1) ก = ก            ) ก 9" 0* "ก ( * ก
  ก        "ก       ก 8(                  #, ก " 6% ก(" ก      ( /"
/ (user define functions : UDF) * 0*ก # ก > 6#0                  ก ก /" *
   ก 0 ก "ก % ก 9( % )              % ก ( /" / # 0ก )               C $!% "
 6ก*%
   ก /" ก / ) % " ! "                (        )     0 ก ก ( /" / * ) ก =
ก ' $#0          ' ก $!% 3 0 '
             2.1 ก ($))ก ' $#0             'ก
             2.2 ก )ก ' $#0*$)) ' ก
                        (
             2.3 ก ) ก ' $#0
                          (                 'ก
      8( ก 0* 0 ก1 ) ก            0* " ! .6% /" ก                 #, ( *% >ก
   ' ) /%     ก 0* 0 9( $!%) # "3ก* %ก             $!% " ) )
) ก
            -
 " 9        / ' ).6/3 / ( 3
" #O- *- - ?- *- ).6/3 / ( 4
  " ? -* * - -"  ).6/3 / ( 8
 " ก P- .- ) ).6/3 / ( 13
      3
 " กQ*=+ ก 6    ).6/3 / ( 14
" - "3 ? '       ).6/3 / ( 20

More Related Content

What's hot

School safety india handbook
School safety india handbookSchool safety india handbook
School safety india handbook
Kunal Ashar
 
Functional php
Functional phpFunctional php
Functional php
Jean Carlo Machado
 
Git avançado
Git avançadoGit avançado
Git avançado
Jean Carlo Machado
 
Science World Board Presentation
Science World Board PresentationScience World Board Presentation
Science World Board PresentationDanny Robinson
 
"Internationalisation with PHP and Intl" source code
"Internationalisation with PHP and Intl" source code"Internationalisation with PHP and Intl" source code
"Internationalisation with PHP and Intl" source code
Daniel_Rhodes
 
De 0 a 100 con Bash Shell Scripting y AWK
De 0 a 100 con Bash Shell Scripting y AWKDe 0 a 100 con Bash Shell Scripting y AWK
De 0 a 100 con Bash Shell Scripting y AWK
Adolfo Sanz De Diego
 
Ruby ile tanışma!
Ruby ile tanışma!Ruby ile tanışma!
Ruby ile tanışma!
Uğur Özyılmazel
 
Cysts of the jaw 10
Cysts of the jaw 10Cysts of the jaw 10
Cysts of the jaw 10Hai Trieu
 
Meet up symfony 16 juin 2017 - Les PSR
Meet up symfony 16 juin 2017 -  Les PSRMeet up symfony 16 juin 2017 -  Les PSR
Meet up symfony 16 juin 2017 - Les PSR
Julien Vinber
 
Corporate Council on Africa Infrastructure Conference, Washington, DC, Septem...
Corporate Council on Africa Infrastructure Conference, Washington, DC, Septem...Corporate Council on Africa Infrastructure Conference, Washington, DC, Septem...
Corporate Council on Africa Infrastructure Conference, Washington, DC, Septem...lucamazzei
 
Pecha Kucha
Pecha KuchaPecha Kucha
Pecha Kucha
Jose Diaz-Gonzalez
 
Rothke Press
Rothke PressRothke Press
Rothke Press
Ben Rothke
 
Scroll pHAT HD に美咲フォント
Scroll pHAT HD に美咲フォントScroll pHAT HD に美咲フォント
Scroll pHAT HD に美咲フォント
Yuriko IKEDA
 
Bouncingballs sh
Bouncingballs shBouncingballs sh
Bouncingballs sh
Ben Pope
 
Getfilestruct zbksh(1)
Getfilestruct zbksh(1)Getfilestruct zbksh(1)
Getfilestruct zbksh(1)
Ben Pope
 
LAMP_TRAINING_SESSION_6
LAMP_TRAINING_SESSION_6LAMP_TRAINING_SESSION_6
LAMP_TRAINING_SESSION_6
umapst
 

What's hot (20)

Leng 15
Leng 15Leng 15
Leng 15
 
Retrato de xavi.
Retrato de xavi.Retrato de xavi.
Retrato de xavi.
 
School safety india handbook
School safety india handbookSchool safety india handbook
School safety india handbook
 
Functional php
Functional phpFunctional php
Functional php
 
Git avançado
Git avançadoGit avançado
Git avançado
 
Science World Board Presentation
Science World Board PresentationScience World Board Presentation
Science World Board Presentation
 
"Internationalisation with PHP and Intl" source code
"Internationalisation with PHP and Intl" source code"Internationalisation with PHP and Intl" source code
"Internationalisation with PHP and Intl" source code
 
De 0 a 100 con Bash Shell Scripting y AWK
De 0 a 100 con Bash Shell Scripting y AWKDe 0 a 100 con Bash Shell Scripting y AWK
De 0 a 100 con Bash Shell Scripting y AWK
 
Ruby ile tanışma!
Ruby ile tanışma!Ruby ile tanışma!
Ruby ile tanışma!
 
Cysts of the jaw 10
Cysts of the jaw 10Cysts of the jaw 10
Cysts of the jaw 10
 
Barcelona.pm Curs1211 sess01
Barcelona.pm Curs1211 sess01Barcelona.pm Curs1211 sess01
Barcelona.pm Curs1211 sess01
 
Meet up symfony 16 juin 2017 - Les PSR
Meet up symfony 16 juin 2017 -  Les PSRMeet up symfony 16 juin 2017 -  Les PSR
Meet up symfony 16 juin 2017 - Les PSR
 
Corporate Council on Africa Infrastructure Conference, Washington, DC, Septem...
Corporate Council on Africa Infrastructure Conference, Washington, DC, Septem...Corporate Council on Africa Infrastructure Conference, Washington, DC, Septem...
Corporate Council on Africa Infrastructure Conference, Washington, DC, Septem...
 
Pecha Kucha
Pecha KuchaPecha Kucha
Pecha Kucha
 
Rothke Press
Rothke PressRothke Press
Rothke Press
 
Scroll pHAT HD に美咲フォント
Scroll pHAT HD に美咲フォントScroll pHAT HD に美咲フォント
Scroll pHAT HD に美咲フォント
 
Anna bhaaryato
Anna bhaaryatoAnna bhaaryato
Anna bhaaryato
 
Bouncingballs sh
Bouncingballs shBouncingballs sh
Bouncingballs sh
 
Getfilestruct zbksh(1)
Getfilestruct zbksh(1)Getfilestruct zbksh(1)
Getfilestruct zbksh(1)
 
LAMP_TRAINING_SESSION_6
LAMP_TRAINING_SESSION_6LAMP_TRAINING_SESSION_6
LAMP_TRAINING_SESSION_6
 

Similar to ภาษา C

ΓΛΩΣΣΑ C - ΜΑΘΗΜΑ 10 (ΕΚΤΥΠΩΣΗ)
ΓΛΩΣΣΑ C - ΜΑΘΗΜΑ 10 (ΕΚΤΥΠΩΣΗ)ΓΛΩΣΣΑ C - ΜΑΘΗΜΑ 10 (ΕΚΤΥΠΩΣΗ)
ΓΛΩΣΣΑ C - ΜΑΘΗΜΑ 10 (ΕΚΤΥΠΩΣΗ)
Dimitris Psounis
 
Projet Sponsoring Paris Football Club
Projet Sponsoring Paris Football ClubProjet Sponsoring Paris Football Club
Projet Sponsoring Paris Football Club
Jim Totime
 
Danos morais obito dengue hemorragica resp. estado
Danos morais obito dengue hemorragica resp. estadoDanos morais obito dengue hemorragica resp. estado
Danos morais obito dengue hemorragica resp. estadoInforma Jurídico
 
Ssijialiye
SsijialiyeSsijialiye
Ssijialiyerenata7
 
The Critical Need for Encrypted Email and File Transfer Solutions
The Critical Need for Encrypted Email and File Transfer SolutionsThe Critical Need for Encrypted Email and File Transfer Solutions
The Critical Need for Encrypted Email and File Transfer Solutions
Osterman Research, Inc.
 
WALA Tutorial at PLDI 2010
WALA Tutorial at PLDI 2010WALA Tutorial at PLDI 2010
WALA Tutorial at PLDI 2010
Julian Dolby
 
Proactief Netwerken
Proactief NetwerkenProactief Netwerken
Proactief Netwerken
Jan Jacobs
 
Time Travel - Predicting the Future and Surviving a Parallel Universe - JDC2012
Time Travel - Predicting the Future and Surviving a Parallel Universe - JDC2012 Time Travel - Predicting the Future and Surviving a Parallel Universe - JDC2012
Time Travel - Predicting the Future and Surviving a Parallel Universe - JDC2012 Hossam Karim
 
ΠΛΗ31 ΤΥΠΟΛΟΓΙΟ ΕΝΟΤΗΤΑΣ 1
ΠΛΗ31 ΤΥΠΟΛΟΓΙΟ ΕΝΟΤΗΤΑΣ 1ΠΛΗ31 ΤΥΠΟΛΟΓΙΟ ΕΝΟΤΗΤΑΣ 1
ΠΛΗ31 ΤΥΠΟΛΟΓΙΟ ΕΝΟΤΗΤΑΣ 1
Dimitris Psounis
 
Where 2.0 -- Get me a mobile strategy or you’re fired!
Where 2.0 -- Get me a mobile strategy or you’re fired!Where 2.0 -- Get me a mobile strategy or you’re fired!
Where 2.0 -- Get me a mobile strategy or you’re fired!
Jason Grigsby
 
Get me a mobile strategy or you're fired web 2
Get me a mobile strategy or you're fired   web 2Get me a mobile strategy or you're fired   web 2
Get me a mobile strategy or you're fired web 2
Jason Grigsby
 
An easy way to learn hip muscles
An easy way to learn hip musclesAn easy way to learn hip muscles
An easy way to learn hip muscles
Christiane Riedinger
 
My Secret Bahrain & Ohlala! June 2011
My Secret Bahrain & Ohlala! June 2011My Secret Bahrain & Ohlala! June 2011
My Secret Bahrain & Ohlala! June 2011
mysecretbahrain
 
Perrée &amp; Partners, Collectief Pensioen
Perrée &amp; Partners, Collectief PensioenPerrée &amp; Partners, Collectief Pensioen
Perrée &amp; Partners, Collectief Pensioen
henk0610
 
DiplomadoIABMex_Equipo6
DiplomadoIABMex_Equipo6DiplomadoIABMex_Equipo6
DiplomadoIABMex_Equipo6
jorgemacias23
 
Offbeat
Offbeat Offbeat
Offbeat
Dinudey Baidya
 
Ipad gump
Ipad gumpIpad gump
Ipad gump
Tuany Beiram
 

Similar to ภาษา C (20)

ΓΛΩΣΣΑ C - ΜΑΘΗΜΑ 10 (ΕΚΤΥΠΩΣΗ)
ΓΛΩΣΣΑ C - ΜΑΘΗΜΑ 10 (ΕΚΤΥΠΩΣΗ)ΓΛΩΣΣΑ C - ΜΑΘΗΜΑ 10 (ΕΚΤΥΠΩΣΗ)
ΓΛΩΣΣΑ C - ΜΑΘΗΜΑ 10 (ΕΚΤΥΠΩΣΗ)
 
Projet Sponsoring Paris Football Club
Projet Sponsoring Paris Football ClubProjet Sponsoring Paris Football Club
Projet Sponsoring Paris Football Club
 
Danos morais obito dengue hemorragica resp. estado
Danos morais obito dengue hemorragica resp. estadoDanos morais obito dengue hemorragica resp. estado
Danos morais obito dengue hemorragica resp. estado
 
Ssijialiye
SsijialiyeSsijialiye
Ssijialiye
 
The Critical Need for Encrypted Email and File Transfer Solutions
The Critical Need for Encrypted Email and File Transfer SolutionsThe Critical Need for Encrypted Email and File Transfer Solutions
The Critical Need for Encrypted Email and File Transfer Solutions
 
WALA Tutorial at PLDI 2010
WALA Tutorial at PLDI 2010WALA Tutorial at PLDI 2010
WALA Tutorial at PLDI 2010
 
Proactief Netwerken
Proactief NetwerkenProactief Netwerken
Proactief Netwerken
 
Time Travel - Predicting the Future and Surviving a Parallel Universe - JDC2012
Time Travel - Predicting the Future and Surviving a Parallel Universe - JDC2012 Time Travel - Predicting the Future and Surviving a Parallel Universe - JDC2012
Time Travel - Predicting the Future and Surviving a Parallel Universe - JDC2012
 
ΠΛΗ31 ΤΥΠΟΛΟΓΙΟ ΕΝΟΤΗΤΑΣ 1
ΠΛΗ31 ΤΥΠΟΛΟΓΙΟ ΕΝΟΤΗΤΑΣ 1ΠΛΗ31 ΤΥΠΟΛΟΓΙΟ ΕΝΟΤΗΤΑΣ 1
ΠΛΗ31 ΤΥΠΟΛΟΓΙΟ ΕΝΟΤΗΤΑΣ 1
 
Where 2.0 -- Get me a mobile strategy or you’re fired!
Where 2.0 -- Get me a mobile strategy or you’re fired!Where 2.0 -- Get me a mobile strategy or you’re fired!
Where 2.0 -- Get me a mobile strategy or you’re fired!
 
Get me a mobile strategy or you're fired web 2
Get me a mobile strategy or you're fired   web 2Get me a mobile strategy or you're fired   web 2
Get me a mobile strategy or you're fired web 2
 
An easy way to learn hip muscles
An easy way to learn hip musclesAn easy way to learn hip muscles
An easy way to learn hip muscles
 
Bra
BraBra
Bra
 
025 bra
025 bra025 bra
025 bra
 
My Secret Bahrain & Ohlala! June 2011
My Secret Bahrain & Ohlala! June 2011My Secret Bahrain & Ohlala! June 2011
My Secret Bahrain & Ohlala! June 2011
 
Perrée &amp; Partners, Collectief Pensioen
Perrée &amp; Partners, Collectief PensioenPerrée &amp; Partners, Collectief Pensioen
Perrée &amp; Partners, Collectief Pensioen
 
Javaee glassfish jcertif2010
Javaee glassfish jcertif2010Javaee glassfish jcertif2010
Javaee glassfish jcertif2010
 
DiplomadoIABMex_Equipo6
DiplomadoIABMex_Equipo6DiplomadoIABMex_Equipo6
DiplomadoIABMex_Equipo6
 
Offbeat
Offbeat Offbeat
Offbeat
 
Ipad gump
Ipad gumpIpad gump
Ipad gump
 

More from Noppanon YourJust'one

ส่งภาพประกวด
ส่งภาพประกวดส่งภาพประกวด
ส่งภาพประกวดNoppanon YourJust'one
 
การนำเข้าไฟล์เสียง
การนำเข้าไฟล์เสียงการนำเข้าไฟล์เสียง
การนำเข้าไฟล์เสียงNoppanon YourJust'one
 
กิจกรรมส่งภาพประกวด
กิจกรรมส่งภาพประกวดกิจกรรมส่งภาพประกวด
กิจกรรมส่งภาพประกวดNoppanon YourJust'one
 
ส่งภาพเข้าประกวด
ส่งภาพเข้าประกวดส่งภาพเข้าประกวด
ส่งภาพเข้าประกวดNoppanon YourJust'one
 
ขั้นตอนการทำ Emoticon อย่างง่าย โดยใช้ flash8
ขั้นตอนการทำ Emoticon อย่างง่าย โดยใช้ flash8ขั้นตอนการทำ Emoticon อย่างง่าย โดยใช้ flash8
ขั้นตอนการทำ Emoticon อย่างง่าย โดยใช้ flash8Noppanon YourJust'one
 
เทคนิค Flash cs ทำตัวอักษรวิ่งๆ แต่สีตัวอักษรเป็นพื้นรูป background
เทคนิค Flash cs ทำตัวอักษรวิ่งๆ แต่สีตัวอักษรเป็นพื้นรูป backgroundเทคนิค Flash cs ทำตัวอักษรวิ่งๆ แต่สีตัวอักษรเป็นพื้นรูป background
เทคนิค Flash cs ทำตัวอักษรวิ่งๆ แต่สีตัวอักษรเป็นพื้นรูป backgroundNoppanon YourJust'one
 
ประกวดภาพถ่าย
ประกวดภาพถ่ายประกวดภาพถ่าย
ประกวดภาพถ่ายNoppanon YourJust'one
 
ภูมิปัญญาท้องถิ่น พิธีกรรมทำขวัญข้าว
ภูมิปัญญาท้องถิ่น พิธีกรรมทำขวัญข้าวภูมิปัญญาท้องถิ่น พิธีกรรมทำขวัญข้าว
ภูมิปัญญาท้องถิ่น พิธีกรรมทำขวัญข้าวNoppanon YourJust'one
 
ข้อสอบวิเคราะห์
ข้อสอบวิเคราะห์ข้อสอบวิเคราะห์
ข้อสอบวิเคราะห์Noppanon YourJust'one
 
ภาษา C โปรแกรมย่อยและฟังก์ชันมาตรฐาน
ภาษา C โปรแกรมย่อยและฟังก์ชันมาตรฐานภาษา C โปรแกรมย่อยและฟังก์ชันมาตรฐาน
ภาษา C โปรแกรมย่อยและฟังก์ชันมาตรฐานNoppanon YourJust'one
 

More from Noppanon YourJust'one (13)

Line maps for indoor
Line maps for indoorLine maps for indoor
Line maps for indoor
 
ข่าว It
ข่าว Itข่าว It
ข่าว It
 
ส่งภาพประกวด
ส่งภาพประกวดส่งภาพประกวด
ส่งภาพประกวด
 
การนำเข้าไฟล์เสียง
การนำเข้าไฟล์เสียงการนำเข้าไฟล์เสียง
การนำเข้าไฟล์เสียง
 
กิจกรรมส่งภาพประกวด
กิจกรรมส่งภาพประกวดกิจกรรมส่งภาพประกวด
กิจกรรมส่งภาพประกวด
 
ส่งภาพเข้าประกวด
ส่งภาพเข้าประกวดส่งภาพเข้าประกวด
ส่งภาพเข้าประกวด
 
ขั้นตอนการทำ Emoticon อย่างง่าย โดยใช้ flash8
ขั้นตอนการทำ Emoticon อย่างง่าย โดยใช้ flash8ขั้นตอนการทำ Emoticon อย่างง่าย โดยใช้ flash8
ขั้นตอนการทำ Emoticon อย่างง่าย โดยใช้ flash8
 
เทคนิค Flash cs ทำตัวอักษรวิ่งๆ แต่สีตัวอักษรเป็นพื้นรูป background
เทคนิค Flash cs ทำตัวอักษรวิ่งๆ แต่สีตัวอักษรเป็นพื้นรูป backgroundเทคนิค Flash cs ทำตัวอักษรวิ่งๆ แต่สีตัวอักษรเป็นพื้นรูป background
เทคนิค Flash cs ทำตัวอักษรวิ่งๆ แต่สีตัวอักษรเป็นพื้นรูป background
 
ประกวดภาพถ่าย
ประกวดภาพถ่ายประกวดภาพถ่าย
ประกวดภาพถ่าย
 
ภูมิปัญญาท้องถิ่น พิธีกรรมทำขวัญข้าว
ภูมิปัญญาท้องถิ่น พิธีกรรมทำขวัญข้าวภูมิปัญญาท้องถิ่น พิธีกรรมทำขวัญข้าว
ภูมิปัญญาท้องถิ่น พิธีกรรมทำขวัญข้าว
 
ข้อสอบวิเคราะห์
ข้อสอบวิเคราะห์ข้อสอบวิเคราะห์
ข้อสอบวิเคราะห์
 
ภาษา C โปรแกรมย่อยและฟังก์ชันมาตรฐาน
ภาษา C โปรแกรมย่อยและฟังก์ชันมาตรฐานภาษา C โปรแกรมย่อยและฟังก์ชันมาตรฐาน
ภาษา C โปรแกรมย่อยและฟังก์ชันมาตรฐาน
 
ข่าว It 3
ข่าว It 3ข่าว It 3
ข่าว It 3
 

Recently uploaded

Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
James Anderson
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
Matthew Sinclair
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
Uni Systems S.M.S.A.
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
Neo4j
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
sonjaschweigert1
 
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdfSAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
Peter Spielvogel
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
Neo4j
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
BookNet Canada
 
GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...
ThomasParaiso2
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
Guy Korland
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
Quotidiano Piemontese
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems S.M.S.A.
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Albert Hoitingh
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
mikeeftimakis1
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
Aftab Hussain
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
Ralf Eggert
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
Jemma Hussein Allen
 
By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024
Pierluigi Pugliese
 

Recently uploaded (20)

Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
 
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdfSAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
 
GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 
By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024
 

ภาษา C

  • 1.
  • 2. C ก ก C !" # ก $#!% " ก& ' ( ( ( ก ) * + #, ก ( - (. -* C $!% /" / 0 ก1 $ % header file C ' ก1 $ % 0 2) () ) ก3 *.h * & ( ( #, ก ( /" / "ก ก " # 0ก )" " (.6% /" # 0ก ) /" / ) % " ! " ( * )' )*% ก / & !" " "!/ 0* ก )! * $# 7.1 ก (standard functions) #, ก ( - (. -* C $!% /" / 0 ก1 $ % header file C ' ก1 $ % 0 2) () ) ก3 *.h * & )( *% ก % ก ! *% 6% ก "6 header file ! ก '" % ' ( #include<header file.h> /% ) * *% / # 0ก ) ) % ก (*% ก $!% 8( ก ) * + #, ก ( - .6%. -* C compiler /" / 9( %.6% % $# " ก /" # 0ก ) %ก /" # 0ก ) ! ก0 "/ ' "ก ก ) * + :$ ก : (library functions)
  • 3. ก )*+ ( ก /% ก <9 ก ) * + ( #, 0 "ก % "& 8( )! * $# 7.1.1 ก (mathematic functions) #, ก ( % ก ' = '=-*> * 0 ก ( % ก # *% %' ( #include <math.h> 0 ก "6* *% / # 0ก ) 0 * 0# ( % ก # *% ) -! (type) #, double ( ก. 9? ($!% ก ก # $!%' ก / /% )6 #, double ก ก ! acos(x) asin(x) atan(x) sin(x) cos(x) tan(x) sqrt(x) exp(x) pow(x,y) log(x) log10(x) ceil(x) floor(x) fabs(x)
  • 4. 1) ก acos(x) #, ก ( %' = ' arc cosine / x !" ( x #, ' )3) " !" (radian) 6#0 acos(x); 2) ก asin(x) #, ก ( %' = ' arc sine / x !" ( x #, ' )3) " !" 6#0 asin(x); 3) ก atan(x) #, ก ( %' = ' arc tan / x !" ( x #, ' )3) " !" 6#0 atan(x);
  • 5. 4) ก sin(x) #, ก ( %' = ' sine / x !" ( x #, ' )3) " !" 6#0 sin(x); 5) ก cos(x) #, ก ( %' = ' cosine / x !" ( x #, ' )3) " !" 6#0 cos(x); 6) ก tan(x) #, ก ( %' = ' tan / x !" ( x #, ' )3) " !" 6#0 tan(x);
  • 6. 9( ' ) /% ก % ก acos(x), asin(x), atan(x), sin(x), cos(x) 0 tan(x) ) ก"-( / %>ก # 0ก )* " * $# "# $ก %&' 7.1 0 ! ก % ก acos(x), asin(x), atan(x), sin(x), cos(x) 0 tan(x) * math1.c */ #include<stdio.h> /* ! ( 1 */ #include<math.h> /* ! ( 2 */ #include<conio.h> /* ! ( 3 */ void main(void) /* ! ( 4 */ { /* ! ( 5 */ double r, pi = 3.141592654; /* ! ( 6 */ r = pi/180; /* ! ( 7 */ clrscr(); /* ! ( 8 */ printf("%fn",asin(r)); /* ! ( 9 */ printf("%fn",acos(r)); /* ! ( 10 */ printf("%fn",atan(r)); /* ! ( 11 */ printf("%fn",sin(r)); /* ! ( 12 */ printf("%fn",cos(r)); /* ! ( 13 */ printf("%fn",tan(r)); /* ! ( 14 */ printf("nPress any key back to program ..."); /* ! ( 15 */ getch(); /* ! ( 16 */ } /* ! ( 17 */
  • 7. ())*+ , -. ก"# $ก
  • 8. ' ?- " # 0ก ) ก # 0ก )* " ( 7.1 ) ?- "ก / # 0ก ) ( 'N & $!%! ! ( 9 ' ( printf("%fn",asin(r)); ก ' = ' arc sin / * 0# r !" r #, )3) " !" 0 0 ! . 9? ($!% ก 9 ! ( 10 ' ( printf("%fn",acos(r)); ก ' = ' arc cosine / * 0# r !" r #, )3) " !" 0 0 ! . 9? ($!% ก 9 ! ( 11 ' ( printf("%fn",atan(r)); ก ' = ' arc tan / * 0# r !" r #, )3) " !" 0 0 ! . 9? ($!% ก 9 ! ( 12 ' ( printf("%fn",sin(r)); ก ' = ' sine / * 0# r !" r #, )3) " !" 0 0 ! . 9? ($!% ก 9 ! ( 13 ' ( printf("%fn",cos(r)); ก ' = ' cosine / * 0# r !" r #, )3) " !" 0 0 ! . 9? ($!% ก 9 ! ( 14 ' ( printf("%fn",tan(r)); ก ' = ' tan / * 0# r !" r #, )3) " !" 0 0 ! . 9? ($!% ก 9 ! ( 15 0 16 9-)9/% ' ) %ก!'" ! & 9( ก 6 # 0ก ) 0 "3! ' ! & ก! enter ก /% 6 # 0ก ) /* ! ( 17 */
  • 9. 7) ก sqrt(x) #, ก ( % ' ก ( 2 (square root) / ' ' ( * 0# x !" ( x *% #, ' ' ( -! * / * 0# )' $)*-! ( 6#0 sqrt(x); 8) ก exp(x) #, ก ( % ' ex !" ( x #, ' ' ( * 0# ( % #, ' "กก / e !" ( e )' # ) = 2.718282 6#0 exp(x); 9) ก pow(x,y) #, ก ( % ' xy !" ( x #, ' ' ( * 0# ( % #, * + 8( *% )' ) กก >6 " y #, ' ' ( * 0# ( % #, ' "กก 6#0 pow(x, y);
  • 10. 1.2 ก ก(" ก * ก (character functions) #, ก ( %ก /% )6 ) -! #, single char ( ( % ( 1 byte) 0 ก ( % ก # *% %' ( #include<ctype.h> 0 ก "6 * *% / # 0ก ) ) "ก % ก # $!% ก ก(" ก * ก ( 'N isalnum(ch), isalpha(ch), isdigit(ch), islower(ch), isupper(ch), tolower(ch), toupper(ch), isspace(ch), isxdigit(ch) 1.3 ก ก(" ก * - (string functions) #, ก ( ก /% )6 -! * - (string) % !"ก ( % ก # *% %' ( #include<string.h> 0 ก "6* *% / # 0ก ) "ก "ก % ก # $!% ก ก(" ก * - ( 'N strlen(s), strcmp(s1,s2) , strcpy(s), strcat(s1,s2) 1.4 ก ( $# ( % "& ก clrscr( ) #, ก ( % ก /% )6 ก ก 90 text mode ก gotoxy(x,y) #, ก ( ' ( %* * 0 % (cursor) ' ( ($#" * 0 ( 3$ % 9 ก sizeof(x) #, ก ( %* / !/ * 0# x )/ !ก( Byte
  • 11. 2. ก ( /" / (user defined functions) ก ( /" / ' "ก # 0ก )" " ' / # 0ก ) ( /" / 9( % ) $!% " ! " ( * )' ) *% ก .6% /" # 0ก ) C -") "ก # 0ก )" " : ก : .6% ( /" # 0ก ) # ' ' 0 -ก -") "ก : # 0ก )" ": " $ ก1* ) # 0ก )" " ก ก1) ก = ก ) ก 9" 0* "ก ( * ก ก "ก ก 8( #, ก " 6% ก(" ก ( /" / (user define functions : UDF) * 0*ก # ก > 6#0 ก ก /" * ก 0 ก "ก % ก 9( % ) % ก ( /" / # 0ก ) C $!% " 6ก*% ก /" ก / ) % " ! " ( ) 0 ก ก ( /" / * ) ก = ก ' $#0 ' ก $!% 3 0 ' 2.1 ก ($))ก ' $#0 'ก 2.2 ก )ก ' $#0*$)) ' ก ( 2.3 ก ) ก ' $#0 ( 'ก 8( ก 0* 0 ก1 ) ก 0* " ! .6% /" ก #, ( *% >ก ' ) /% ก 0* 0 9( $!%) # "3ก* %ก $!% " ) )
  • 12. ) ก - " 9 / ' ).6/3 / ( 3 " #O- *- - ?- *- ).6/3 / ( 4 " ? -* * - -" ).6/3 / ( 8 " ก P- .- ) ).6/3 / ( 13 3 " กQ*=+ ก 6 ).6/3 / ( 14 " - "3 ? ' ).6/3 / ( 20