SlideShare una empresa de Scribd logo
1 de 2
Descargar para leer sin conexión
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

Más contenido relacionado

La actualidad más candente

Ma4 set-u-s54
Ma4 set-u-s54Ma4 set-u-s54
Ma4 set-u-s54Koku Love
 
Forum2009 Sm Grp Disc Summary 0014
Forum2009 Sm Grp Disc Summary 0014Forum2009 Sm Grp Disc Summary 0014
Forum2009 Sm Grp Disc Summary 0014Tom Loughran
 
13 แสง
13 แสง13 แสง
13 แสงtopofzeed
 
Python variables datatypes
Python variables datatypesPython variables datatypes
Python variables datatypesradhikaadroja
 
Lvb Sonate 10no1 1 Let
Lvb Sonate 10no1 1 LetLvb Sonate 10no1 1 Let
Lvb Sonate 10no1 1 Letguest2dde99
 
miniLesson on the printf() function
miniLesson on the printf() functionminiLesson on the printf() function
miniLesson on the printf() functionChristine Wolfe
 
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 SolversTobias Philipp
 
รับมือไข้หวัดใหญ ่ สายพันธุ์ใหม่ 2009 แบบ บ้านๆ แต่ได้ผล
 รับมือไข้หวัดใหญ ่ สายพันธุ์ใหม่ 2009 แบบ บ้านๆ แต่ได้ผล รับมือไข้หวัดใหญ ่ สายพันธุ์ใหม่ 2009 แบบ บ้านๆ แต่ได้ผล
รับมือไข้หวัดใหญ ่ สายพันธุ์ใหม่ 2009 แบบ บ้านๆ แต่ได้ผลsurachai chai
 
industrial Technology Assistance Program: iTAP
industrial Technology Assistance Program: iTAPindustrial Technology Assistance Program: iTAP
industrial Technology Assistance Program: iTAPNstdaAcademy Nstda
 
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 unixchinkshady
 
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 tubahanktuba
 

La actualidad más candente (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
 

Similar a เขียนโปรแกรมใช้คำสั่ง 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
 
Questions typedef and macros
Questions typedef and macrosQuestions typedef and macros
Questions typedef and macrosMohammed Sikander
 
C programming BY Mazedur
C programming BY MazedurC programming BY Mazedur
C programming BY MazedurMazedurr rahman
 
C programs Set 4
C programs Set 4C programs Set 4
C programs Set 4Koshy Geoji
 
ภาษาซีพื้นฐาน
ภาษาซีพื้นฐานภาษาซีพื้นฐาน
ภาษาซีพื้นฐานKrunee Thitthamon
 
Practical File of C Language
Practical File of C LanguagePractical File of C Language
Practical File of C LanguageRAJWANT KAUR
 
The solution manual of programming in ansi by Robin
The solution manual of programming in ansi by RobinThe solution manual of programming in ansi by Robin
The solution manual of programming in ansi by RobinShariful Haque Robin
 

Similar a เขียนโปรแกรมใช้คำสั่ง 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
 
Unit2 C
Unit2 CUnit2 C
Unit2 C
 
Unit2 C
Unit2 C Unit2 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
 
The solution manual of programming in ansi by Robin
The solution manual of programming in ansi by RobinThe solution manual of programming in ansi by Robin
The solution manual of programming in ansi by Robin
 

Más de ธงชัย พาศรี

ใบงานเรื่องการคอมไพล์โปรแกรม
ใบงานเรื่องการคอมไพล์โปรแกรมใบงานเรื่องการคอมไพล์โปรแกรม
ใบงานเรื่องการคอมไพล์โปรแกรมธงชัย พาศรี
 
เขียนโปรแกรมใช้คำสั่ง 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)ธงชัย พาศรี
 

Más de ธงชัย พาศรี (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)
 

Último

Practical Research 1: Lesson 8 Writing the Thesis Statement.pptx
Practical Research 1: Lesson 8 Writing the Thesis Statement.pptxPractical Research 1: Lesson 8 Writing the Thesis Statement.pptx
Practical Research 1: Lesson 8 Writing the Thesis Statement.pptxKatherine Villaluna
 
Diploma in Nursing Admission Test Question Solution 2023.pdf
Diploma in Nursing Admission Test Question Solution 2023.pdfDiploma in Nursing Admission Test Question Solution 2023.pdf
Diploma in Nursing Admission Test Question Solution 2023.pdfMohonDas
 
Maximizing Impact_ Nonprofit Website Planning, Budgeting, and Design.pdf
Maximizing Impact_ Nonprofit Website Planning, Budgeting, and Design.pdfMaximizing Impact_ Nonprofit Website Planning, Budgeting, and Design.pdf
Maximizing Impact_ Nonprofit Website Planning, Budgeting, and Design.pdfTechSoup
 
Human-AI Co-Creation of Worked Examples for Programming Classes
Human-AI Co-Creation of Worked Examples for Programming ClassesHuman-AI Co-Creation of Worked Examples for Programming Classes
Human-AI Co-Creation of Worked Examples for Programming ClassesMohammad Hassany
 
Clinical Pharmacy Introduction to Clinical Pharmacy, Concept of clinical pptx
Clinical Pharmacy  Introduction to Clinical Pharmacy, Concept of clinical pptxClinical Pharmacy  Introduction to Clinical Pharmacy, Concept of clinical pptx
Clinical Pharmacy Introduction to Clinical Pharmacy, Concept of clinical pptxraviapr7
 
How to Add a many2many Relational Field in Odoo 17
How to Add a many2many Relational Field in Odoo 17How to Add a many2many Relational Field in Odoo 17
How to Add a many2many Relational Field in Odoo 17Celine George
 
How to Use api.constrains ( ) in Odoo 17
How to Use api.constrains ( ) in Odoo 17How to Use api.constrains ( ) in Odoo 17
How to Use api.constrains ( ) in Odoo 17Celine George
 
Benefits & Challenges of Inclusive Education
Benefits & Challenges of Inclusive EducationBenefits & Challenges of Inclusive Education
Benefits & Challenges of Inclusive EducationMJDuyan
 
Practical Research 1 Lesson 9 Scope and delimitation.pptx
Practical Research 1 Lesson 9 Scope and delimitation.pptxPractical Research 1 Lesson 9 Scope and delimitation.pptx
Practical Research 1 Lesson 9 Scope and delimitation.pptxKatherine Villaluna
 
P4C x ELT = P4ELT: Its Theoretical Background (Kanazawa, 2024 March).pdf
P4C x ELT = P4ELT: Its Theoretical Background (Kanazawa, 2024 March).pdfP4C x ELT = P4ELT: Its Theoretical Background (Kanazawa, 2024 March).pdf
P4C x ELT = P4ELT: Its Theoretical Background (Kanazawa, 2024 March).pdfYu Kanazawa / Osaka University
 
How to Show Error_Warning Messages in Odoo 17
How to Show Error_Warning Messages in Odoo 17How to Show Error_Warning Messages in Odoo 17
How to Show Error_Warning Messages in Odoo 17Celine George
 
Education and training program in the hospital APR.pptx
Education and training program in the hospital APR.pptxEducation and training program in the hospital APR.pptx
Education and training program in the hospital APR.pptxraviapr7
 
How to Make a Field read-only in Odoo 17
How to Make a Field read-only in Odoo 17How to Make a Field read-only in Odoo 17
How to Make a Field read-only in Odoo 17Celine George
 
How to Manage Cross-Selling in Odoo 17 Sales
How to Manage Cross-Selling in Odoo 17 SalesHow to Manage Cross-Selling in Odoo 17 Sales
How to Manage Cross-Selling in Odoo 17 SalesCeline George
 
5 charts on South Africa as a source country for international student recrui...
5 charts on South Africa as a source country for international student recrui...5 charts on South Africa as a source country for international student recrui...
5 charts on South Africa as a source country for international student recrui...CaraSkikne1
 
How to Add a New Field in Existing Kanban View in Odoo 17
How to Add a New Field in Existing Kanban View in Odoo 17How to Add a New Field in Existing Kanban View in Odoo 17
How to Add a New Field in Existing Kanban View in Odoo 17Celine George
 
How to Solve Singleton Error in the Odoo 17
How to Solve Singleton Error in the  Odoo 17How to Solve Singleton Error in the  Odoo 17
How to Solve Singleton Error in the Odoo 17Celine George
 
Patterns of Written Texts Across Disciplines.pptx
Patterns of Written Texts Across Disciplines.pptxPatterns of Written Texts Across Disciplines.pptx
Patterns of Written Texts Across Disciplines.pptxMYDA ANGELICA SUAN
 

Último (20)

Practical Research 1: Lesson 8 Writing the Thesis Statement.pptx
Practical Research 1: Lesson 8 Writing the Thesis Statement.pptxPractical Research 1: Lesson 8 Writing the Thesis Statement.pptx
Practical Research 1: Lesson 8 Writing the Thesis Statement.pptx
 
Diploma in Nursing Admission Test Question Solution 2023.pdf
Diploma in Nursing Admission Test Question Solution 2023.pdfDiploma in Nursing Admission Test Question Solution 2023.pdf
Diploma in Nursing Admission Test Question Solution 2023.pdf
 
Maximizing Impact_ Nonprofit Website Planning, Budgeting, and Design.pdf
Maximizing Impact_ Nonprofit Website Planning, Budgeting, and Design.pdfMaximizing Impact_ Nonprofit Website Planning, Budgeting, and Design.pdf
Maximizing Impact_ Nonprofit Website Planning, Budgeting, and Design.pdf
 
Human-AI Co-Creation of Worked Examples for Programming Classes
Human-AI Co-Creation of Worked Examples for Programming ClassesHuman-AI Co-Creation of Worked Examples for Programming Classes
Human-AI Co-Creation of Worked Examples for Programming Classes
 
Clinical Pharmacy Introduction to Clinical Pharmacy, Concept of clinical pptx
Clinical Pharmacy  Introduction to Clinical Pharmacy, Concept of clinical pptxClinical Pharmacy  Introduction to Clinical Pharmacy, Concept of clinical pptx
Clinical Pharmacy Introduction to Clinical Pharmacy, Concept of clinical pptx
 
How to Add a many2many Relational Field in Odoo 17
How to Add a many2many Relational Field in Odoo 17How to Add a many2many Relational Field in Odoo 17
How to Add a many2many Relational Field in Odoo 17
 
How to Use api.constrains ( ) in Odoo 17
How to Use api.constrains ( ) in Odoo 17How to Use api.constrains ( ) in Odoo 17
How to Use api.constrains ( ) in Odoo 17
 
Benefits & Challenges of Inclusive Education
Benefits & Challenges of Inclusive EducationBenefits & Challenges of Inclusive Education
Benefits & Challenges of Inclusive Education
 
Practical Research 1 Lesson 9 Scope and delimitation.pptx
Practical Research 1 Lesson 9 Scope and delimitation.pptxPractical Research 1 Lesson 9 Scope and delimitation.pptx
Practical Research 1 Lesson 9 Scope and delimitation.pptx
 
P4C x ELT = P4ELT: Its Theoretical Background (Kanazawa, 2024 March).pdf
P4C x ELT = P4ELT: Its Theoretical Background (Kanazawa, 2024 March).pdfP4C x ELT = P4ELT: Its Theoretical Background (Kanazawa, 2024 March).pdf
P4C x ELT = P4ELT: Its Theoretical Background (Kanazawa, 2024 March).pdf
 
How to Show Error_Warning Messages in Odoo 17
How to Show Error_Warning Messages in Odoo 17How to Show Error_Warning Messages in Odoo 17
How to Show Error_Warning Messages in Odoo 17
 
Education and training program in the hospital APR.pptx
Education and training program in the hospital APR.pptxEducation and training program in the hospital APR.pptx
Education and training program in the hospital APR.pptx
 
How to Make a Field read-only in Odoo 17
How to Make a Field read-only in Odoo 17How to Make a Field read-only in Odoo 17
How to Make a Field read-only in Odoo 17
 
How to Manage Cross-Selling in Odoo 17 Sales
How to Manage Cross-Selling in Odoo 17 SalesHow to Manage Cross-Selling in Odoo 17 Sales
How to Manage Cross-Selling in Odoo 17 Sales
 
5 charts on South Africa as a source country for international student recrui...
5 charts on South Africa as a source country for international student recrui...5 charts on South Africa as a source country for international student recrui...
5 charts on South Africa as a source country for international student recrui...
 
How to Add a New Field in Existing Kanban View in Odoo 17
How to Add a New Field in Existing Kanban View in Odoo 17How to Add a New Field in Existing Kanban View in Odoo 17
How to Add a New Field in Existing Kanban View in Odoo 17
 
How to Solve Singleton Error in the Odoo 17
How to Solve Singleton Error in the  Odoo 17How to Solve Singleton Error in the  Odoo 17
How to Solve Singleton Error in the Odoo 17
 
Patterns of Written Texts Across Disciplines.pptx
Patterns of Written Texts Across Disciplines.pptxPatterns of Written Texts Across Disciplines.pptx
Patterns of Written Texts Across Disciplines.pptx
 
Finals of Kant get Marx 2.0 : a general politics quiz
Finals of Kant get Marx 2.0 : a general politics quizFinals of Kant get Marx 2.0 : a general politics quiz
Finals of Kant get Marx 2.0 : a general politics quiz
 
Personal Resilience in Project Management 2 - TV Edit 1a.pdf
Personal Resilience in Project Management 2 - TV Edit 1a.pdfPersonal Resilience in Project Management 2 - TV Edit 1a.pdf
Personal Resilience in Project Management 2 - TV Edit 1a.pdf
 

เขียนโปรแกรมใช้คำสั่ง 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