SlideShare a Scribd company logo
LOGO
ตัวกระทำำกำร
Operator
Company Logo
ตัวกระทำำ
กำร
ควำมหมำย ตัวอย่ำง
+ กำรบวก (Addition) A+B
- กำรลบ (Subtraction) A-B
* กำรคูณ (Multiplication) A*B
/ กำรหำร (Division) A/B
% กำรหำรเอำเศษ (Remainder) A%B
ตัวกระทำำกำรทำงคณิตศำสตร์ Arithmetic
Operator
Company Logo
ตัวกระทำำ
กำร
ควำมหมำย ตัวอย่ำง
< น้อยกว่ำ (Less Than) A<B
> มำกกว่ำ (Greater Than) A>B
<= น้อยกว่ำหรือเท่ำกับ (Less Than
or Equal)
A<=B
>= มำกกว่ำหรือเท่ำกับ (Greater Than
or Equal)
A>=B
== เท่ำกับ (Equal) A==B
!= ไม่เท่ำกับ (Not Equal) A!=B
ตัวกระทำำกำรทำงคณิตศำสตร์ Arithmetic
Operator
Company Logo
ตัวกระทำำกำรเชิงตรรกะ Logical
Operator
ตัวกระทำำ
กำร
ควำมหมำย ตัวอย่ำง
&& และ (And) A<B && C>D
|| หรือ (Or) A<B || C>D
! ปฏิเสธ (Not) !(A>B)
Company Logo
ตัวกระทำำกำรเพิ่มค่ำและลดค่ำ
Increment and Decrement Operator
ตัวกระทำำ
กำร
ควำมหมำย ตัวอย่ำง
++ เพิ่มค่ำ (Increment) A++ หรือ ++A
-- ลดค่ำ (Decrement) A-- หรือ --A
A = 10;
B = 10;
C= ++A * 2;
D = B++ * 2;
//A = 11 //B = 11
// C = 22 //D = 20
A = 10;
B = 10;
C= --A * 2;
D = B-- * 2;
//A = 9 //B = 9
// C = 18 //D = 20
Company Logo
ตัวกระทำำกำรคอมม่ำ (,)
ตัวกระทำำกำรที่ใช้คั่นนิพจน์
โดยนิพจน์ทำงซ้ำยของเครื่อง
หมำยคอมม่ำจะถูกคำำนวนก่อน
นิพจน์ทำงขวำ
ตัวกระทำำกำรที่ใช้คั่นนิพจน์
โดยนิพจน์ทำงซ้ำยของเครื่อง
หมำยคอมม่ำจะถูกคำำนวนก่อน
นิพจน์ทำงขวำ
B = (A=10, A=A-5, 25/A);
A = 10;
B = (A=A-5,25/A);
Company Logo
Question ?
Company Logo
แบบฝึกหัด
๏ รับข้อมูลเป็นตัวเลขจากคีย์บอร์ด
2 จำานวน แล้วเขียนคำาสั่งเพื่อหาค่า
ดังต่อไปนี้แล้วแสดงผลออกสู่หน้า
จอ
- นำาค่าทั้ง 2 มาบวกแล้วแสดงผล
- นำาค่าทั้ง 2 มาลบแล้วแสดงผล
- นำาค่าทั้ง 2 มาคูณแล้วแสดงผล
- นำาค่าทั้ง 2 มาหารแล้วแสดงผล
- นำาค่าทั้ง 2 มาหารเอาเศษแล้วแสดง
ผล
LOGO
LOGO

More Related Content

Viewers also liked

Tealium retargeting data sheet
Tealium retargeting data sheetTealium retargeting data sheet
Tealium retargeting data sheet
ICEMarketing
 
Finding Non-dilutive Funding for Your Technology Startup
Finding Non-dilutive Funding for Your Technology StartupFinding Non-dilutive Funding for Your Technology Startup
Finding Non-dilutive Funding for Your Technology Startup
Non-dilutive.com
 
Social Media The Good, The Bad And The Ugly
Social Media The Good, The Bad And The UglySocial Media The Good, The Bad And The Ugly
Social Media The Good, The Bad And The Ugly
TNO
 
Slides for the open evening rp 27.05.10
Slides for the open evening rp 27.05.10Slides for the open evening rp 27.05.10
Slides for the open evening rp 27.05.10
Martin Lawrence
 
[1041] basileios boulgaroktonos
[1041] basileios boulgaroktonos[1041] basileios boulgaroktonos
[1041] basileios boulgaroktonosPetros Michailidis
 
The status of android dec2010
The status of android dec2010The status of android dec2010
The status of android dec2010
Tom Wehmeier
 
Ba Session3
Ba Session3Ba Session3
Ba Session3
CMoz
 
Foi and open data
Foi and open dataFoi and open data
Foi and open data
Martin Lawrence
 
Gvl Berkeley Cambridge University Minshall
Gvl Berkeley Cambridge University MinshallGvl Berkeley Cambridge University Minshall
analysis of a professional film opening
analysis of a professional film openinganalysis of a professional film opening
analysis of a professional film opening
guest6dbf425a
 
The Project I'm Managing
The Project I'm ManagingThe Project I'm Managing
The Project I'm Managing
Josh Friedman
 
Naruto474
Naruto474Naruto474
Naruto474
Elfam
 
I want to be a Data DJ!
I want to be a Data DJ!I want to be a Data DJ!
I want to be a Data DJ!
Paul Groth
 
Hungarian traditional menu
Hungarian traditional menuHungarian traditional menu
Hungarian traditional menu
Petros Michailidis
 
Web 2.0 Part 2
Web 2.0 Part 2Web 2.0 Part 2
Web 2.0 Part 2
Kent Bugg
 

Viewers also liked (17)

Καραΐσκάκης
ΚαραΐσκάκηςΚαραΐσκάκης
Καραΐσκάκης
 
Tealium retargeting data sheet
Tealium retargeting data sheetTealium retargeting data sheet
Tealium retargeting data sheet
 
Finding Non-dilutive Funding for Your Technology Startup
Finding Non-dilutive Funding for Your Technology StartupFinding Non-dilutive Funding for Your Technology Startup
Finding Non-dilutive Funding for Your Technology Startup
 
Social Media The Good, The Bad And The Ugly
Social Media The Good, The Bad And The UglySocial Media The Good, The Bad And The Ugly
Social Media The Good, The Bad And The Ugly
 
Slides for the open evening rp 27.05.10
Slides for the open evening rp 27.05.10Slides for the open evening rp 27.05.10
Slides for the open evening rp 27.05.10
 
[1041] basileios boulgaroktonos
[1041] basileios boulgaroktonos[1041] basileios boulgaroktonos
[1041] basileios boulgaroktonos
 
The status of android dec2010
The status of android dec2010The status of android dec2010
The status of android dec2010
 
Ba Session3
Ba Session3Ba Session3
Ba Session3
 
Foi and open data
Foi and open dataFoi and open data
Foi and open data
 
Gvl Berkeley Cambridge University Minshall
Gvl Berkeley Cambridge University MinshallGvl Berkeley Cambridge University Minshall
Gvl Berkeley Cambridge University Minshall
 
analysis of a professional film opening
analysis of a professional film openinganalysis of a professional film opening
analysis of a professional film opening
 
England Christmas Dinner
England Christmas DinnerEngland Christmas Dinner
England Christmas Dinner
 
The Project I'm Managing
The Project I'm ManagingThe Project I'm Managing
The Project I'm Managing
 
Naruto474
Naruto474Naruto474
Naruto474
 
I want to be a Data DJ!
I want to be a Data DJ!I want to be a Data DJ!
I want to be a Data DJ!
 
Hungarian traditional menu
Hungarian traditional menuHungarian traditional menu
Hungarian traditional menu
 
Web 2.0 Part 2
Web 2.0 Part 2Web 2.0 Part 2
Web 2.0 Part 2
 

More from นายพิศณุ ท่าสอน (8)

Chapter 05 Loop
Chapter 05 LoopChapter 05 Loop
Chapter 05 Loop
 
Lab Chapter7 Structure And Function
Lab Chapter7 Structure And FunctionLab Chapter7 Structure And Function
Lab Chapter7 Structure And Function
 
Array1
Array1Array1
Array1
 
Array 2
Array 2Array 2
Array 2
 
Chapter 05 Loop
Chapter 05 LoopChapter 05 Loop
Chapter 05 Loop
 
Chapter 04 Compare
Chapter 04 CompareChapter 04 Compare
Chapter 04 Compare
 
Chapter 02 Flowchart
Chapter 02 FlowchartChapter 02 Flowchart
Chapter 02 Flowchart
 
Variable Constant Math
Variable Constant MathVariable Constant Math
Variable Constant Math
 

Chapter 01 Analysis 1