SlideShare une entreprise Scribd logo
1  sur  12
Télécharger pour lire hors ligne
ก           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

Contenu connexe

Tendances

Science World Board Presentation
Science World Board PresentationScience World Board Presentation
Science World Board Presentation
Danny Robinson
 
Cysts of the jaw 10
Cysts of the jaw 10Cysts of the jaw 10
Cysts of the jaw 10
Hai Trieu
 
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
 
Getfilestruct zbksh(1)
Getfilestruct zbksh(1)Getfilestruct zbksh(1)
Getfilestruct zbksh(1)
Ben Pope
 

Tendances (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
 

Similaire à ภาษา C

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
Informa Jurídico
 
Ssijialiye
SsijialiyeSsijialiye
Ssijialiye
renata7
 
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
 

Similaire à ภาษา 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
 
025 bra
025 bra025 bra
025 bra
 
Bra
BraBra
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
 

Plus de Noppanon YourJust'one

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

Plus de 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
 

Dernier

Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 

Dernier (20)

Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 

ภาษา 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