01006012 Computer Programming 10 Windows 01006012 Computer Programming

  • Slides: 50
Download presentation

01006012 Computer Programming 10

01006012 Computer Programming 10

Windows 01006012 Computer Programming • Windows ป 1985 -ปจจบน เปนระบบ GUI (Graphic User Interface)

Windows 01006012 Computer Programming • Windows ป 1985 -ปจจบน เปนระบบ GUI (Graphic User Interface) ภาษาทใชในการสรางคอ C/C++ และ Assembly language 14

Unix 01006012 Computer Programming 16

Unix 01006012 Computer Programming 16

ซอฟทแวร (2) 01006012 Computer Programming 17

ซอฟทแวร (2) 01006012 Computer Programming 17

การแปลงตวเลขฐานสองเปนฐานสบหก 01006012 Computer Programming ฐานสบหก ฐานสอง 0 1 2 3 4 5 6 7

การแปลงตวเลขฐานสองเปนฐานสบหก 01006012 Computer Programming ฐานสบหก ฐานสอง 0 1 2 3 4 5 6 7 0000 0001 0010 0011 0100 0101 0110 0111 8 9 A B C D E F 1000 1001 1010 1011 1100 1101 1110 1111 24

ตารางรหสแอสก (ASCII Code Table) 0 01006012 Computer Programming 1 2 3 4 5 6

ตารางรหสแอสก (ASCII Code Table) 0 01006012 Computer Programming 1 2 3 4 5 6 7 8 9 A B C D E F ! " # $ % & ' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ? 4 @ A B C D E F G H I J K L M N O 5 P Q R S T U V W X Y Z [ ] ^ _ 6 ' a b c d e f g h i j k l m n o 7 p q r s t u v w x y z { | } ~ 8 9 A B C D E F 29

1. 8 รจกภาษาซ 01006012 Computer Programming ���� BCPL ������� (Martin Richards) Basic Combined Programming

1. 8 รจกภาษาซ 01006012 Computer Programming ���� BCPL ������� (Martin Richards) Basic Combined Programming Language ���� B ������ (Ken Thompson) 1970������ (Dennis Ritchie) 1972 ��� Bell Labs ������� 1978 ������ (Kernighan) ������ (Dennis Ritchie) 32

โครงสรางโปรแกรมภาษาซ 01006012 Computer Programming #include<file. h> ��������� type function_name(type); ��������� type variable �������� int

โครงสรางโปรแกรมภาษาซ 01006012 Computer Programming #include<file. h> ��������� type function_name(type); ��������� type variable �������� int main() { type variable; �������� statement-1; . . . ����������� statement-n; return 0; } ������ type function_name(type variable) { statement-1; . . . ������ statement-n; return(var); } 36

โปรแกรม Visual C++ 2008 Express Edition 01006012 Computer Programming 37

โปรแกรม Visual C++ 2008 Express Edition 01006012 Computer Programming 37

Step 1 : สรางโปรเจคใหม (File --> New --> Project) 01006012 Computer Programming 38

Step 1 : สรางโปรเจคใหม (File --> New --> Project) 01006012 Computer Programming 38

Step 2: เลอกประเภทโปรแกรมทจะสราง (เลอก Win 32 --> Win 32 Console Application) 01006012 Computer Programming

Step 2: เลอกประเภทโปรแกรมทจะสราง (เลอก Win 32 --> Win 32 Console Application) 01006012 Computer Programming 39

Step 3: ตงชอโปรเจค (ใสชอท Name เชน Hello. World, Lab 01_1, Lab 01_2) 01006012 Computer

Step 3: ตงชอโปรเจค (ใสชอท Name เชน Hello. World, Lab 01_1, Lab 01_2) 01006012 Computer Programming 40

Step 4: เลอกตำแหนงทจะเกบโปรเจค (Browse --> D: --> Make New Folder --> รหส น. ศ.

Step 4: เลอกตำแหนงทจะเกบโปรเจค (Browse --> D: --> Make New Folder --> รหส น. ศ. --> OK --> Next ) 01006012 Computer Programming 41

Step 5: กำหนดลกษณะของโปรแกรม (Next --> Console Application --> Empty Project --> Finish) 01006012 Computer

Step 5: กำหนดลกษณะของโปรแกรม (Next --> Console Application --> Empty Project --> Finish) 01006012 Computer Programming 42

Step 6: สรางโปรแกรมใหม (คลกขวาท Source File --> Add --> New Item) 01006012 Computer Programming

Step 6: สรางโปรแกรมใหม (คลกขวาท Source File --> Add --> New Item) 01006012 Computer Programming 43

Step 7: สรางไฟลโปรแกรม (เลอก C++ File --> ท Name ตงชอไฟล เชน Hello. World, Lab

Step 7: สรางไฟลโปรแกรม (เลอก C++ File --> ท Name ตงชอไฟล เชน Hello. World, Lab 01_1 --> Add) 01006012 Computer Programming 44

Step 8: เขยนโปรแกรม 01006012 Computer Programming 45

Step 8: เขยนโปรแกรม 01006012 Computer Programming 45

Step 9: สงใหโปรแกรมทำงาน (Debug --> Start Without Debugging หรอ กด Ctrl+F 5) 01006012 Computer

Step 9: สงใหโปรแกรมทำงาน (Debug --> Start Without Debugging หรอ กด Ctrl+F 5) 01006012 Computer Programming 46

Step 10: ยนยนการสรางโปรแกรม 01006012 Computer Programming 47

Step 10: ยนยนการสรางโปรแกรม 01006012 Computer Programming 47

Step 11: ตรวจสอบผลลพธ 01006012 Computer Programming 48

Step 11: ตรวจสอบผลลพธ 01006012 Computer Programming 48