งานนำเสนอกำลังจะดาวน์โหลด โปรดรอ

งานนำเสนอกำลังจะดาวน์โหลด โปรดรอ

การรับและการแสดงผลข้อมูล

งานนำเสนอที่คล้ายกัน


งานนำเสนอเรื่อง: "การรับและการแสดงผลข้อมูล"— ใบสำเนางานนำเสนอ:

1 การรับและการแสดงผลข้อมูล
Chapter 2 การรับและการแสดงผลข้อมูล กราบเรียนท่านอาจารย์ และสวัสดีเพื่อนๆ Introduction to Programming Department of Computer Business

2 การแสดงข้อมูล ฟังก์ชัน printf() <stdio.h>
รูปแบบ printf(“format string”,argument…) format string : ส่วนควบคุมการพิมพ์ต่าง ๆ argument : ตัวแปร , ค่าคงที่ , นิพจน์ ฯลฯ example printf(“\n This is a test first program”); printf(“Your score is %d”,score); กราบเรียนท่านอาจารย์ และสวัสดีเพื่อนๆ Introduction to Programming Department of Computer Business

3 อักขระพิเศษที่ใช้สำหรับการควบคุม
\n การขึ้นบรรทัดใหม่ \t การเลื่อนระยะ tab ทางแนวนอน \b การเลื่อนเคอร์เซอร์ย้อนกลับครั้งละ 1 ตัวอักษร \f การเลื่อนระยะหน้ากระดาษ \r การเลื่อนเคอร์เซอร์ไปอยู่ต้นบรรทัด กราบเรียนท่านอาจารย์ และสวัสดีเพื่อนๆ Introduction to Programming Department of Computer Business

4 การแสดงข้อมูล ฟังก์ชัน putchar() <conio.h>
รูปแบบ putchar(argument) argument : ตัวแปร , ค่าคงที่ , ฟังก์ชัน example x=‘A’; putchar(x); putchar(‘A’); กราบเรียนท่านอาจารย์ และสวัสดีเพื่อนๆ Introduction to Programming Department of Computer Business

5 การรับข้อมูล ฟังก์ชัน scanf() <stdio.h>
รูปแบบ scanf(“format string”,&argument…) format string : รูปแบบการรับข้อมูล argument : ตัวแปรที่ใช้รับข้อมูล example scanf(“%d”,&age); scanf(“%d %s %f”,&order,&name,&value); กราบเรียนท่านอาจารย์ และสวัสดีเพื่อนๆ Introduction to Programming Department of Computer Business

6 การรับข้อมูล ฟังก์ชัน getchar() <conio.h>
รูปแบบ argument = getchar() argument : ตัวแปรที่ใช้รับข้อมูลเป็นตัวอักษร example charactor = getchar(); กราบเรียนท่านอาจารย์ และสวัสดีเพื่อนๆ Introduction to Programming Department of Computer Business

7 การรับข้อมูล ฟังก์ชัน getche() <conio.h>
รูปแบบ argument = getche() argument : ตัวแปรที่ใช้รับข้อมูลเป็นตัวอักษร example charactor = getche(); กราบเรียนท่านอาจารย์ และสวัสดีเพื่อนๆ Introduction to Programming Department of Computer Business

8 การรับข้อมูล ฟังก์ชัน getch() <conio.h>
รูปแบบ argument = getch() argument : ตัวแปรที่ใช้รับข้อมูลเป็นตัวอักษร example charactor = getch(); กราบเรียนท่านอาจารย์ และสวัสดีเพื่อนๆ Introduction to Programming Department of Computer Business

9 การรับข้อมูล ฟังก์ชัน gets() <conio.h> รูปแบบ gets(argument)
example gets(charactor); กราบเรียนท่านอาจารย์ และสวัสดีเพื่อนๆ Introduction to Programming Department of Computer Business


ดาวน์โหลด ppt การรับและการแสดงผลข้อมูล

งานนำเสนอที่คล้ายกัน


Ads by Google