 Arithmetic Operator :  Increment / Decrement Operator :  Assignment Operator :  Comparision Operator :  Logical Operator :  Ternary Operator : 

Slides:



Advertisements
Similar presentations
Operators and Arithmetic Operations. Operators An operator is a symbol that instructs the code to perform some operations or actions on one or more operands.
Advertisements

Session 1 & 2BBK P1 Module5-May-2007 : [‹#›] PHP: Moving On..
Chapter 41 Variables and JSP Control Structures JavaServer Pages By Xue Bai.
All the Operators. Precedence An operator with higher precedence is done earlier (prededes) one with lower precedence –A higher precedence is indicated.
All the Operators. Precedence An operator with higher precedence is done earlier (prededes) one with lower precedence –A higher precedence is indicated.
Chapter 2: Java Fundamentals Operators. Introduction to OOP Dr. S. GANNOUNI & Dr. A. TOUIR Page 2 Content Group of Operators Arithmetic Operators Assignment.
Introduction to Computers and Programming Class 9 Introduction to C Professor Avi Rosenfeld.
1 Expressions, Operators Expressions Operators and Precedence Reading for this class: L&L, 2.4.
1 Lecture 3  Lexical elements  Some operators:  /, %, =, +=, ++, --  precedence and associativity  #define  Readings: Chapter 2 Section 1 to 10.
 Three permissible styles of comments  line comments  e.g. //comments on a line by themselves  block comments  e.g. /*comments on one line or can.
PROPERTIES REVIEW!. MULTIPLICATION PROPERTY OF EQUALITY.
C++ Operators CS242 COMPUTER PROGRAMMING T.Banan Al-Hadlaq.
Chapter 4: Basic C Operators
2010/11 : [1]Building Web Applications using MySQL and PHP (W1)PHP Recap.
Exercises A-Declare a variable of double type with initial value=0.0; B- Declare a constant of String type with initial value=“Good” C- Declare a variable.
Chapter 2: Basic Elements of Java J ava P rogramming: From Problem Analysis to Program Design, From Problem Analysis to Program Design, Second Edition.
Chapter 2 Basic Elements of Java. Chapter Objectives Become familiar with the basic components of a Java program, including methods, special symbols,
CSE1301 Computer Programming Lecture 5: C Primitives 2 Corrections.
Chapter 5 NUTS AND BOLTS: STANDARD STUFF IN C++. Chapter 5 The C++ Arithmetic Operators –Addition+ –Subtraction– –Multiplication  –Division/ –Modulus.
Simple Data Types and Statements. Namespaces namespace MyNamespace { // …. { MyNamespace::func1() using namespace OtherNamespace; Comments: // /* xxxx.
LESSON 6 – Arithmetic Operators
Week 5 Introduction to Computer Science and Object-Oriented Programming COMP 111 George Basham.
Semester Review. As we have discussed, Friday we will have in class time for you to work on a program, this program will come with instructions and you.
C++ Programming: Basic Elements of C++.
IT 152 Data Structures and Algorithms Tonga Institute of Higher Education.
Java Programming: From Problem Analysis to Program Design, 4e Chapter 2 Basic Elements of Java.
AEEE 195 – Repetition Structures: Part B Spring semester 2011.
Data Types and Operators  Two category of data types:  Primitive type: value type. Store values.  Object type: reference type. Store addresses.
Lesson - 7. Operators There are three types of operators: Arithmetic Operators Relational and Equality Operators Logical Operators.
C Operators. CONTENTS C OPERATORS TYPES OF OPERATOR UNARY BINARY TERNARY ARITHMATIC RELATIONAL LOGICAL.
15-Nov-15 All the Operators. operators.ppt 2 Precedence An operator with higher precedence is done earlier (precedes) one with lower precedence A higher.
Lesson - 5. Introduction While programming, we usually need to decide the path of the program flow according to the parameters and conditions. Actually.
1 Expressions. 2 Variables and constants linked with operators  Arithmetic expressions Uses arithmetic operators Can evaluate to any value  Logical.
1 More data types Character and String –Non-numeric variables –Examples: char orange; String something; –orange and something are variable names –Note.
By: Mr. Baha Hanene Chapter 6. LEARNING OUTCOMES This chapter will cover the learning outcome 02 i.e. 2.Use basic data-types and input / output in C programs.
© 2005 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved. Java Operator Precedence Operator Meaning Assoc. ===========================================================.
Python Mini-Course University of Oklahoma Department of Psychology Day 3 – Lesson 10 Iteration: Loops 05/02/09 Python Mini-Course: Day 3 - Lesson 10 1.
OperatorstMyn1 Operators An operator is something that you feed with one or more values (or expressions, in programming jargon) which yields another value.
FP512 WEB PROGRAMMING 1 PREPARED BY: PN. NUR SYUHADA BINTI MOHAMAD.
What is algorithm? the steps needed for a computer program to solve a given problem Using: Pseudo code Flow chart Or high level coding.
By: Tameicka James Addition Subtraction Division Multiplication
STRUCTURED PROGRAMMING C++ Operators. Content 2  C++ operators  Assignment operators  Arithmetic operators  Increment and decrement operators  Decision.
8.2 Solving Two Step Equations. 2 more Properties of Equality Addition Property of Equality If a=b Then a+c =b+c Subtraction Property of Eqaulity If a=b.
Java Programming: From Problem Analysis to Program Design, Second Edition 1 Lecture 1 Objectives  Become familiar with the basic components of a Java.
LECTURE # 6 : STRUCTURED PROGRAMMING C++ OPERATORS By Mr. Ali Edan.
NUMBER SENTENCES 6.7.
PHP Workshop ‹#› أطلق إبداعك 2 أطلق إبداعك 2 مدرس معتمد من مركز زووم PHP: Moving On..
Chapter 7 JavaScript: Control Statements, Part 1
>> Fundamental Concepts in PHP
Lecture 3: Operators, Expressions and Type Conversion
Operators Operators are symbols such as + (addition), - (subtraction), and * (multiplication). Operators do something with values. $foo = 25; $foo – 15;
Arithmetic & other operations
Computer Programming: C language
Properties for Addition and Multiplication only
1 Step Equation Practice + - x ÷
2008/10/27: Lecture 13 CMSC 104, Section 0101 John Y. Park
All the Operators 22-Nov-18.
All the Operators 4-Dec-18.
Introduction to Programming – 4 Operators
2008/10/27: Lecture 13 CMSC 104, Section 0101 John Y. Park
elementary programming
Assignment Operators Topics Increment and Decrement Operators
All the Operators 6-Apr-19.
All the Operators 13-Apr-19.
Operators In Java Programming By Rajanikanth B.
Operator and Expression
Assignment Operators Topics Increment and Decrement Operators
Algoritma & Pemrograman 1
Assignment Operators Topics Increment and Decrement Operators
Assignment Operators Topics Increment and Decrement Operators
Presentation transcript:

 Arithmetic Operator :  Increment / Decrement Operator :  Assignment Operator :  Comparision Operator :  Logical Operator :  Ternary Operator :  String Operator :

$a + $b = Sum of $a and $b $a - $b = Subtraction of $a and $b $a * $b = Multiplication of $a and $b $a / $b = Division of $a and $b $a % $b = Modulus of $a and $b

++$a = Pre-increment. $a++ = Post-increment. --$a = Pre-decrement. $a-- = Post-decrement.

= $a = $b $a= $b += $a += $b $c= $a + $b -= $a -= $b $c= $a - $b *= $a *= $b $c= $a * $b /= $a /= $b $c= $a / $b %= $a+=$b $c = $a % $b

$a == $b Equal to $a != $b Not Equal to $a <> $b Not Equal to $a < $b Less than $a > $b Grater than $a <= $b Less than or Equal to $a >= $b Grater than or Equal to

$a And $b $a Or $b $a Xor $b !$a $a && $b $a || $b

Syntax : Test-exp ? Yes-exp :No-expression Example : $a=10; $b=20; (a>b) ? Echo “$a” : echo “$b”;

Syntax : (‘. ‘) (‘.= ‘) Example : <?php $a=“hello”; $b=$a.“World !”; $a=“hello”; $b.=“World”; ?>