SlideShare ist ein Scribd-Unternehmen logo
1 von 2
Downloaden Sie, um offline zu lesen
5             2553                                                                        -   ....................................................................
                                                                                 40203
                                           F                    (                            F )                                                5
                                                     F       printf() scanf()
   F             F             F F                                 F                         F                     F
            1               F 0508531.CPP
#include <stdio.h>
#include <conio.h>
main()                                                                                                       F         F
   {
        int score1,score2,score3,score4,score5;                                                      F               F
        int scoretotal;                             F         F
        float scoreave;                               F         F
        scoretotal = 0;                     F 0 F            scoretotal
        scoreave = 0;                        F 0 F           scoreave
        printf( Please input number score 1 = );                                          F        Please input number score 1 =
        scanf( %d ,&score1);                                                            F                  F F                    score1
        printf( Please input number score 2 = );                                      F            Please input number score 2 =
        scanf( %d ,&score2);                                                        F                     F F                    score2
        printf( Please input number score 3 = );                              F                   Please input number score 3 =
        scanf( %d ,&score3);                                            F                              F F                       score3
        printf( Please input number score 4 = );                                F                  Please input number score 4 =
        scanf( %d ,&score4);                                              F                             F F                      score4
        printf( Please input number score 5 = );                                  F                Please input number score 5 =
        scanf( %d ,&score5);                                                F                            F F                     score1
        printf( This is Total score : %d n ,scoretotal);             F                        This is Total score :       F            scoretotal
        scoretotal = score1 + score2 + score3 + score4 + score5;                            F                            F          F       scoretotal
        scoreave = scoretotal/5;                                  F                            scoretotal       F 5 F        F         scoreave
        printf( This is Average score : %f ,scoreave);              F                         This is Average score :          F          scoreave
        getch();                     F F 1
   }




                                                                                                                       F
5        2553                                               -   ....................................................................
            2         F 0508532.CPP
#include <stdio.h>
#include <conio.h>
main()                                                                         F                         F
   {
        char name[15],surname[20];
        int age;
        float gpascore;
        printf("Please input your name = " );                                                                                  .....
        scanf("%s",&name);                                                                                                         ..
        printf("Please input your surname = " );                                                                                   .
        scanf("%s",&surname);                                                                                                       .
        printf("Please input your age = " );                                                                                      ..
        scanf("%d",&age);                                                                                                           .
        printf("Please input your gpa score = " );                                                                                    .
        scanf("%f",&gpascore);                                                                                                      .
        printf("Name : %s Surname : %s n",name,surname);
        printf("Age : %d n",age);                                                                                                  ..
        printf("GPA score : %.2f ",gpascore);
        getch();
    }

                                                            F

Weitere ähnliche Inhalte

Was ist angesagt?

Ma4 set-u-s54
Ma4 set-u-s54Ma4 set-u-s54
Ma4 set-u-s54
Koku Love
 
Forum2009 Sm Grp Disc Summary 0014
Forum2009 Sm Grp Disc Summary 0014Forum2009 Sm Grp Disc Summary 0014
Forum2009 Sm Grp Disc Summary 0014
Tom Loughran
 
13 แสง
13 แสง13 แสง
13 แสง
topofzeed
 
Lvb Sonate 10no1 1 Let
Lvb Sonate 10no1 1 LetLvb Sonate 10no1 1 Let
Lvb Sonate 10no1 1 Let
guest2dde99
 
10 awesome examples for viewing huge log files in unix
10 awesome examples for viewing huge log files in unix10 awesome examples for viewing huge log files in unix
10 awesome examples for viewing huge log files in unix
chinkshady
 
Kopprasch 60 selected studies for bb flat tuba
Kopprasch 60 selected studies for bb flat tubaKopprasch 60 selected studies for bb flat tuba
Kopprasch 60 selected studies for bb flat tuba
hanktuba
 

Was ist angesagt? (19)

Ma4 set-u-s54
Ma4 set-u-s54Ma4 set-u-s54
Ma4 set-u-s54
 
ชนิดข้อมูลและตัวแปร
ชนิดข้อมูลและตัวแปรชนิดข้อมูลและตัวแปร
ชนิดข้อมูลและตัวแปร
 
Forum2009 Sm Grp Disc Summary 0014
Forum2009 Sm Grp Disc Summary 0014Forum2009 Sm Grp Disc Summary 0014
Forum2009 Sm Grp Disc Summary 0014
 
13 แสง
13 แสง13 แสง
13 แสง
 
Eecs 317 20010209
Eecs 317 20010209Eecs 317 20010209
Eecs 317 20010209
 
CHAPTER 4
CHAPTER 4CHAPTER 4
CHAPTER 4
 
Python variables datatypes
Python variables datatypesPython variables datatypes
Python variables datatypes
 
Lvb Sonate 10no1 1 Let
Lvb Sonate 10no1 1 LetLvb Sonate 10no1 1 Let
Lvb Sonate 10no1 1 Let
 
ฟังก์ชัน Printf&scanf
ฟังก์ชัน Printf&scanfฟังก์ชัน Printf&scanf
ฟังก์ชัน Printf&scanf
 
K cyber invest-user manual th
K cyber invest-user manual thK cyber invest-user manual th
K cyber invest-user manual th
 
4. loop
4. loop4. loop
4. loop
 
miniLesson on the printf() function
miniLesson on the printf() functionminiLesson on the printf() function
miniLesson on the printf() function
 
จิตอาสา
จิตอาสาจิตอาสา
จิตอาสา
 
An Expressive Model for Instance Decomposition Based Parallel SAT Solvers
An Expressive Model for Instance Decomposition Based Parallel SAT SolversAn Expressive Model for Instance Decomposition Based Parallel SAT Solvers
An Expressive Model for Instance Decomposition Based Parallel SAT Solvers
 
รับมือไข้หวัดใหญ ่ สายพันธุ์ใหม่ 2009 แบบ บ้านๆ แต่ได้ผล
 รับมือไข้หวัดใหญ ่ สายพันธุ์ใหม่ 2009 แบบ บ้านๆ แต่ได้ผล รับมือไข้หวัดใหญ ่ สายพันธุ์ใหม่ 2009 แบบ บ้านๆ แต่ได้ผล
รับมือไข้หวัดใหญ ่ สายพันธุ์ใหม่ 2009 แบบ บ้านๆ แต่ได้ผล
 
industrial Technology Assistance Program: iTAP
industrial Technology Assistance Program: iTAPindustrial Technology Assistance Program: iTAP
industrial Technology Assistance Program: iTAP
 
Bottomupparser
BottomupparserBottomupparser
Bottomupparser
 
10 awesome examples for viewing huge log files in unix
10 awesome examples for viewing huge log files in unix10 awesome examples for viewing huge log files in unix
10 awesome examples for viewing huge log files in unix
 
Kopprasch 60 selected studies for bb flat tuba
Kopprasch 60 selected studies for bb flat tubaKopprasch 60 selected studies for bb flat tuba
Kopprasch 60 selected studies for bb flat tuba
 

Ähnlich wie เขียนโปรแกรมใช้คำสั่ง Printf scanf

บทที่ 6 1 ฟังก์ชัน printf scanf [slide]
บทที่ 6 1 ฟังก์ชัน printf scanf [slide]บทที่ 6 1 ฟังก์ชัน printf scanf [slide]
บทที่ 6 1 ฟังก์ชัน printf scanf [slide]
Nattapon
 
แบบฝึกทักษะการเขียนโปรแกรมภาษาซีเล่ม2
แบบฝึกทักษะการเขียนโปรแกรมภาษาซีเล่ม2แบบฝึกทักษะการเขียนโปรแกรมภาษาซีเล่ม2
แบบฝึกทักษะการเขียนโปรแกรมภาษาซีเล่ม2
อานนท์ มากมี
 
ใบความรู้เรื่องคำสั่ง Printf scanf
ใบความรู้เรื่องคำสั่ง Printf scanfใบความรู้เรื่องคำสั่ง Printf scanf
ใบความรู้เรื่องคำสั่ง Printf scanf
ธงชัย พาศรี
 
2 3. standard io
2 3. standard io2 3. standard io
2 3. standard io
웅식 전
 
ภาษาซี
ภาษาซีภาษาซี
ภาษาซี
kramsri
 
ภาษาซี
ภาษาซีภาษาซี
ภาษาซี
kramsri
 
ภาษาซีพื้นฐาน
ภาษาซีพื้นฐานภาษาซีพื้นฐาน
ภาษาซีพื้นฐาน
Krunee Thitthamon
 

Ähnlich wie เขียนโปรแกรมใช้คำสั่ง Printf scanf (20)

บทที่ 6 1 ฟังก์ชัน printf scanf [slide]
บทที่ 6 1 ฟังก์ชัน printf scanf [slide]บทที่ 6 1 ฟังก์ชัน printf scanf [slide]
บทที่ 6 1 ฟังก์ชัน printf scanf [slide]
 
แบบฝึกทักษะการเขียนโปรแกรมภาษาซีเล่ม2
แบบฝึกทักษะการเขียนโปรแกรมภาษาซีเล่ม2แบบฝึกทักษะการเขียนโปรแกรมภาษาซีเล่ม2
แบบฝึกทักษะการเขียนโปรแกรมภาษาซีเล่ม2
 
ใบความรู้เรื่องคำสั่ง Printf scanf
ใบความรู้เรื่องคำสั่ง Printf scanfใบความรู้เรื่องคำสั่ง Printf scanf
ใบความรู้เรื่องคำสั่ง Printf scanf
 
2 3. standard io
2 3. standard io2 3. standard io
2 3. standard io
 
9.C Programming
9.C Programming9.C Programming
9.C Programming
 
ภาษาซี
ภาษาซีภาษาซี
ภาษาซี
 
ภาษาซี
ภาษาซีภาษาซี
ภาษาซี
 
Questions typedef and macros
Questions typedef and macrosQuestions typedef and macros
Questions typedef and macros
 
pointers 1
pointers 1pointers 1
pointers 1
 
C programming BY Mazedur
C programming BY MazedurC programming BY Mazedur
C programming BY Mazedur
 
C programs Set 4
C programs Set 4C programs Set 4
C programs Set 4
 
Input And Output
 Input And Output Input And Output
Input And Output
 
iit c prog.ppt
iit c prog.pptiit c prog.ppt
iit c prog.ppt
 
ภาษาซีพื้นฐาน
ภาษาซีพื้นฐานภาษาซีพื้นฐาน
ภาษาซีพื้นฐาน
 
C
CC
C
 
C language concept with code apna college.pdf
C language concept with code apna college.pdfC language concept with code apna college.pdf
C language concept with code apna college.pdf
 
Unit2 C
Unit2 C Unit2 C
Unit2 C
 
Unit2 C
Unit2 CUnit2 C
Unit2 C
 
Practical File of C Language
Practical File of C LanguagePractical File of C Language
Practical File of C Language
 
Pointers
PointersPointers
Pointers
 

Mehr von ธงชัย พาศรี

ใบงานเรื่องการคอมไพล์โปรแกรม
ใบงานเรื่องการคอมไพล์โปรแกรมใบงานเรื่องการคอมไพล์โปรแกรม
ใบงานเรื่องการคอมไพล์โปรแกรม
ธงชัย พาศรี
 
เขียนโปรแกรมใช้คำสั่ง Printf scanf
เขียนโปรแกรมใช้คำสั่ง  Printf scanfเขียนโปรแกรมใช้คำสั่ง  Printf scanf
เขียนโปรแกรมใช้คำสั่ง Printf scanf
ธงชัย พาศรี
 
การวิเคราะห์ปัญหา(080653)
การวิเคราะห์ปัญหา(080653)การวิเคราะห์ปัญหา(080653)
การวิเคราะห์ปัญหา(080653)
ธงชัย พาศรี
 
การเขียนผังงานแบบทำซ้ำ (080753)
การเขียนผังงานแบบทำซ้ำ  (080753)การเขียนผังงานแบบทำซ้ำ  (080753)
การเขียนผังงานแบบทำซ้ำ (080753)
ธงชัย พาศรี
 
การเขียนผังงานแบบทางเลือก (050753)
การเขียนผังงานแบบทางเลือก  (050753)การเขียนผังงานแบบทางเลือก  (050753)
การเขียนผังงานแบบทางเลือก (050753)
ธงชัย พาศรี
 
การเขียนผังงานแบบทางเลือก (010753)
การเขียนผังงานแบบทางเลือก  (010753)การเขียนผังงานแบบทางเลือก  (010753)
การเขียนผังงานแบบทางเลือก (010753)
ธงชัย พาศรี
 
การเขียนผังงานแบบทางเลือก (050753)
การเขียนผังงานแบบทางเลือก  (050753)การเขียนผังงานแบบทางเลือก  (050753)
การเขียนผังงานแบบทางเลือก (050753)
ธงชัย พาศรี
 
การเขียนผังงานแบบทางเลือก (010753)
การเขียนผังงานแบบทางเลือก  (010753)การเขียนผังงานแบบทางเลือก  (010753)
การเขียนผังงานแบบทางเลือก (010753)
ธงชัย พาศรี
 

Mehr von ธงชัย พาศรี (11)

ใบงานเรื่องการคอมไพล์โปรแกรม
ใบงานเรื่องการคอมไพล์โปรแกรมใบงานเรื่องการคอมไพล์โปรแกรม
ใบงานเรื่องการคอมไพล์โปรแกรม
 
เขียนโปรแกรมใช้คำสั่ง Printf scanf
เขียนโปรแกรมใช้คำสั่ง  Printf scanfเขียนโปรแกรมใช้คำสั่ง  Printf scanf
เขียนโปรแกรมใช้คำสั่ง Printf scanf
 
การวิเคราะห์ปัญหา(080653)
การวิเคราะห์ปัญหา(080653)การวิเคราะห์ปัญหา(080653)
การวิเคราะห์ปัญหา(080653)
 
การเขียนผังงานแบบทำซ้ำ (080753)
การเขียนผังงานแบบทำซ้ำ  (080753)การเขียนผังงานแบบทำซ้ำ  (080753)
การเขียนผังงานแบบทำซ้ำ (080753)
 
การเขียนผังงานแบบทางเลือก (050753)
การเขียนผังงานแบบทางเลือก  (050753)การเขียนผังงานแบบทางเลือก  (050753)
การเขียนผังงานแบบทางเลือก (050753)
 
การเขียนผังงานแบบทางเลือก (010753)
การเขียนผังงานแบบทางเลือก  (010753)การเขียนผังงานแบบทางเลือก  (010753)
การเขียนผังงานแบบทางเลือก (010753)
 
การเขียนผังงาน (290653)
การเขียนผังงาน (290653)การเขียนผังงาน (290653)
การเขียนผังงาน (290653)
 
การเขียนผังงาน (280653)
การเขียนผังงาน (280653)การเขียนผังงาน (280653)
การเขียนผังงาน (280653)
 
การเขียนผังงานแบบทางเลือก (050753)
การเขียนผังงานแบบทางเลือก  (050753)การเขียนผังงานแบบทางเลือก  (050753)
การเขียนผังงานแบบทางเลือก (050753)
 
การเขียนผังงานแบบทางเลือก (010753)
การเขียนผังงานแบบทางเลือก  (010753)การเขียนผังงานแบบทางเลือก  (010753)
การเขียนผังงานแบบทางเลือก (010753)
 
การเขียนผังงาน (290653)
การเขียนผังงาน (290653)การเขียนผังงาน (290653)
การเขียนผังงาน (290653)
 

Kürzlich hochgeladen

Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
PECB
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
kauryashika82
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
ciinovamais
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
fonyou31
 

Kürzlich hochgeladen (20)

Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdf
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
 
General AI for Medical Educators April 2024
General AI for Medical Educators April 2024General AI for Medical Educators April 2024
General AI for Medical Educators April 2024
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajan
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
 

เขียนโปรแกรมใช้คำสั่ง Printf scanf

  • 1. 5 2553 - .................................................................... 40203 F ( F ) 5 F printf() scanf() F F F F F F F 1 F 0508531.CPP #include <stdio.h> #include <conio.h> main() F F { int score1,score2,score3,score4,score5; F F int scoretotal; F F float scoreave; F F scoretotal = 0; F 0 F scoretotal scoreave = 0; F 0 F scoreave printf( Please input number score 1 = ); F Please input number score 1 = scanf( %d ,&score1); F F F score1 printf( Please input number score 2 = ); F Please input number score 2 = scanf( %d ,&score2); F F F score2 printf( Please input number score 3 = ); F Please input number score 3 = scanf( %d ,&score3); F F F score3 printf( Please input number score 4 = ); F Please input number score 4 = scanf( %d ,&score4); F F F score4 printf( Please input number score 5 = ); F Please input number score 5 = scanf( %d ,&score5); F F F score1 printf( This is Total score : %d n ,scoretotal); F This is Total score : F scoretotal scoretotal = score1 + score2 + score3 + score4 + score5; F F F scoretotal scoreave = scoretotal/5; F scoretotal F 5 F F scoreave printf( This is Average score : %f ,scoreave); F This is Average score : F scoreave getch(); F F 1 } F
  • 2. 5 2553 - .................................................................... 2 F 0508532.CPP #include <stdio.h> #include <conio.h> main() F F { char name[15],surname[20]; int age; float gpascore; printf("Please input your name = " ); ..... scanf("%s",&name); .. printf("Please input your surname = " ); . scanf("%s",&surname); . printf("Please input your age = " ); .. scanf("%d",&age); . printf("Please input your gpa score = " ); . scanf("%f",&gpascore); . printf("Name : %s Surname : %s n",name,surname); printf("Age : %d n",age); .. printf("GPA score : %.2f ",gpascore); getch(); } F