SlideShare une entreprise Scribd logo
1  sur  43
Software Development  Training Program KaZIM HUSSAIn
Operators ,[object Object],[object Object],[object Object],[object Object]
Unary Operators ,[object Object],[object Object],[object Object],++ -- + ! - ~
Increment and Decrement Operator The ++ and – are increment and decrement operators. The increment operator increases its operand by one; the decrement operator decreases its operand by one. ++ --
Increment and Decrement Operator ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Increment and Decrement Operator ,[object Object],[object Object],[object Object],[object Object],[object Object]
Examples Initial value of a Expression Final value of b Final value of a 5 b  =  a++ 5 6 5 b  =  ++a 6 6 5 b  =  a-- 5 4 5 b  =  --a 4 4
Bitwise Inversion Operator ,[object Object],~
Bitwise Inversion Operator ,[object Object],[object Object],[object Object],[object Object],[object Object]
Bitwise Inversion Operator ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Bitwise Inversion Operator ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Boolean Complement Operator ,[object Object],[object Object],[object Object],!
Binary Operators ,[object Object],[object Object],[object Object],Arithmetic Operators * / % + -
Binary Operators Comparison Operator Bitwise Operators Short Circuit Logical Operators & ^ | < <= > >= == != is as && ||
Binary Operators Assignment Operators = *= /= % = += -= & = ^= |=
Arithmetic Operators ,[object Object],* / % + -
Comparison Operator ,[object Object],< <= > >= == != is as
Comparison Operator Operator Result == Equal to != Not equal to >  Greater than <  Less than >= Greater than or equal to <= Less than or equal to
Bitwise Operator ,[object Object],& ^ |
Bitwise Operator (&) ,[object Object],Op1 Op2 Op1  AND  Op2 0 0 0 0 1 0 1 0 0 1 1 1
Bitwise Operator (|) ,[object Object],Op1 Op2 Op1  OR  Op2 0 0 0 0 1 1 1 0 1 1 1 1
Bitwise Operator (^) ,[object Object],Op1 Op2 Op1  XOR  Op2 0 0 0 0 1 1 1 0 1 1 1 0
Bitwise Operator ,[object Object]
Bitwise Operator (&) ,[object Object],Op1 Op2 Op1  AND  Op2 false false false false true false true false false true true true
Bitwise Operator (|) ,[object Object],Op1 Op2 Op1  OR  Op2 false false false false true true true false true true true true
Bitwise Operator (^) ,[object Object],Op1 Op2 Op1  XOR  Op2 false false false false true true true false true true true false
Short Circuit Logical Operators ,[object Object],[object Object],&& ||
Short Circuit Logical Operators ,[object Object],[object Object]
Example ,[object Object],[object Object],[object Object]
Example ,[object Object],[object Object],[object Object]
Assignment Operators = *= /= % = += -= & = ^=
Example ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Ternary Operators ,[object Object],[object Object],[object Object],[object Object],[object Object]
Example ,[object Object],[object Object],[object Object],[object Object],[object Object]
Operator Precedence ,[object Object],[object Object]
Operator Precedence Category Operators Primary (x)  x.y  f(x)  a[x]  x++  x--  new  typeof  sizeof  checked  unchecked Unary =  -  !  ~  ++x  --x  (T)x Multiplicative *  /  % Additive +  - Shift <<  >> Relational <  >  <=  >=  is as Equality ==  != Logical And & Logical XOR ^ Logical OR | Conditional AND && Conditional OR || Conditional ?: Assignment =  *=  /=  %=  +=  -=  <<=  >>=  &=  ^=  |=
Examples ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Examples ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Examples ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Escape Sequences ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Math class Methods Description Example Abs(x) Returns the absolute value of x Math.Abs(-45) is 45 Math.Abs(45) is 45 Round(x) Rounds a value to the nearest integer  Math.Round(4.9) is 5 Math.Round(4.2) is 4 Math.Round(4.5) is  4 Ceiling(x) Returns the smallest integer greater than or equal to the x Math.Ceiling(5.4) is 6 Math.Ceiling(5.9) is 6 Floor(x) Returns the largest integer less then or equal to x Math.Floor(5.4) is 5 Math.Floor(5.9) is 5 Max(x,y) Returns the larger of two number Math.Max(5,9) is 9 Math.Max(5,-9) is 5 Min(x,y) Returns the smaller of two number Math.Min(5,9) is 5 Math.Min(5,-9) is -9
Math class Methods Description Example Pow(x,y) Returns x raised to the power y Math.Pow(4,2) is 16 Sqrt(x) Returns the square root of x Math.Sqrt(9) is 3 Math.Sqrt(5) is 2.23606797749979 Truncate(x) Returns the integral part of x Math.Truncate(38.4) is 38 Math.Truncate(38.485487) is 38
Exercise ,[object Object],[object Object],[object Object]

Contenu connexe

Tendances

Operators in python
Operators in pythonOperators in python
Operators in pythoneShikshak
 
Operator & Expression in c++
Operator & Expression in c++Operator & Expression in c++
Operator & Expression in c++bajiajugal
 
Operation and expression in c++
Operation and expression in c++Operation and expression in c++
Operation and expression in c++Online
 
Operators and expressions in C++
Operators and expressions in C++Operators and expressions in C++
Operators and expressions in C++Neeru Mittal
 
Operators and Expressions in C++
Operators and Expressions in C++Operators and Expressions in C++
Operators and Expressions in C++Praveen M Jigajinni
 
Chapter 5 - Operators in C++
Chapter 5 - Operators in C++Chapter 5 - Operators in C++
Chapter 5 - Operators in C++Deepak Singh
 
Operators in C/C++
Operators in C/C++Operators in C/C++
Operators in C/C++Shobi P P
 
Expression and Operartor In C Programming
Expression and Operartor In C Programming Expression and Operartor In C Programming
Expression and Operartor In C Programming Kamal Acharya
 
Basic c operators
Basic c operatorsBasic c operators
Basic c operatorsdishti7
 
Input processing and output in Python
Input processing and output in PythonInput processing and output in Python
Input processing and output in PythonRaajendra M
 

Tendances (18)

Python Operators
Python OperatorsPython Operators
Python Operators
 
Operators in python
Operators in pythonOperators in python
Operators in python
 
Python operators
Python operatorsPython operators
Python operators
 
Operators and Expressions
Operators and ExpressionsOperators and Expressions
Operators and Expressions
 
Operator & Expression in c++
Operator & Expression in c++Operator & Expression in c++
Operator & Expression in c++
 
Operators in C & C++ Language
Operators in C & C++ LanguageOperators in C & C++ Language
Operators in C & C++ Language
 
Operation and expression in c++
Operation and expression in c++Operation and expression in c++
Operation and expression in c++
 
Operators and expressions in C++
Operators and expressions in C++Operators and expressions in C++
Operators and expressions in C++
 
Operator.ppt
Operator.pptOperator.ppt
Operator.ppt
 
Operators in c++
Operators in c++Operators in c++
Operators in c++
 
Fundamentals of Programming Chapter 5
Fundamentals of Programming Chapter 5Fundamentals of Programming Chapter 5
Fundamentals of Programming Chapter 5
 
Operators and Expressions in C++
Operators and Expressions in C++Operators and Expressions in C++
Operators and Expressions in C++
 
C – operators and expressions
C – operators and expressionsC – operators and expressions
C – operators and expressions
 
Chapter 5 - Operators in C++
Chapter 5 - Operators in C++Chapter 5 - Operators in C++
Chapter 5 - Operators in C++
 
Operators in C/C++
Operators in C/C++Operators in C/C++
Operators in C/C++
 
Expression and Operartor In C Programming
Expression and Operartor In C Programming Expression and Operartor In C Programming
Expression and Operartor In C Programming
 
Basic c operators
Basic c operatorsBasic c operators
Basic c operators
 
Input processing and output in Python
Input processing and output in PythonInput processing and output in Python
Input processing and output in Python
 

En vedette

C Sharp Nagina (1)
C Sharp Nagina (1)C Sharp Nagina (1)
C Sharp Nagina (1)guest58c84c
 
Reuters: Pictures of the Year 2016 (Part 2)
Reuters: Pictures of the Year 2016 (Part 2)Reuters: Pictures of the Year 2016 (Part 2)
Reuters: Pictures of the Year 2016 (Part 2)maditabalnco
 
The Six Highest Performing B2B Blog Post Formats
The Six Highest Performing B2B Blog Post FormatsThe Six Highest Performing B2B Blog Post Formats
The Six Highest Performing B2B Blog Post FormatsBarry Feldman
 
The Outcome Economy
The Outcome EconomyThe Outcome Economy
The Outcome EconomyHelge Tennø
 

En vedette (6)

C Sharp Nagina (1)
C Sharp Nagina (1)C Sharp Nagina (1)
C Sharp Nagina (1)
 
C Sharp Jn
C Sharp JnC Sharp Jn
C Sharp Jn
 
Microsoft .NET Framework
Microsoft .NET FrameworkMicrosoft .NET Framework
Microsoft .NET Framework
 
Reuters: Pictures of the Year 2016 (Part 2)
Reuters: Pictures of the Year 2016 (Part 2)Reuters: Pictures of the Year 2016 (Part 2)
Reuters: Pictures of the Year 2016 (Part 2)
 
The Six Highest Performing B2B Blog Post Formats
The Six Highest Performing B2B Blog Post FormatsThe Six Highest Performing B2B Blog Post Formats
The Six Highest Performing B2B Blog Post Formats
 
The Outcome Economy
The Outcome EconomyThe Outcome Economy
The Outcome Economy
 

Similaire à C Sharp Jn (2)

Similaire à C Sharp Jn (2) (20)

C++ Expressions Notes
C++ Expressions NotesC++ Expressions Notes
C++ Expressions Notes
 
Operators
OperatorsOperators
Operators
 
operators and expressions in c++
 operators and expressions in c++ operators and expressions in c++
operators and expressions in c++
 
6 operators-in-c
6 operators-in-c6 operators-in-c
6 operators-in-c
 
6 operators-in-c
6 operators-in-c6 operators-in-c
6 operators-in-c
 
05 operators
05   operators05   operators
05 operators
 
C++
C++ C++
C++
 
Operators expressions-and-statements
Operators expressions-and-statementsOperators expressions-and-statements
Operators expressions-and-statements
 
python operators.ppt
python operators.pptpython operators.ppt
python operators.ppt
 
Py-Slides-2 (1).ppt
Py-Slides-2 (1).pptPy-Slides-2 (1).ppt
Py-Slides-2 (1).ppt
 
Py-Slides-2.ppt
Py-Slides-2.pptPy-Slides-2.ppt
Py-Slides-2.ppt
 
Py-Slides-2.ppt
Py-Slides-2.pptPy-Slides-2.ppt
Py-Slides-2.ppt
 
Project in TLE
Project in TLEProject in TLE
Project in TLE
 
Operators
OperatorsOperators
Operators
 
C language basics
C language basicsC language basics
C language basics
 
This slide contains information about Operators in C.pptx
This slide contains information about Operators in C.pptxThis slide contains information about Operators in C.pptx
This slide contains information about Operators in C.pptx
 
Operators inc c language
Operators inc c languageOperators inc c language
Operators inc c language
 
Operators and expressions in c language
Operators and expressions in c languageOperators and expressions in c language
Operators and expressions in c language
 
Types of Operators in C
Types of Operators in CTypes of Operators in C
Types of Operators in C
 
Report Group 4 Constants and Variables
Report Group 4 Constants and VariablesReport Group 4 Constants and Variables
Report Group 4 Constants and Variables
 

Dernier

Cyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfCyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfOverkill Security
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...apidays
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxRustici Software
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024The Digital Insurer
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...apidays
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Victor Rentea
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesrafiqahmad00786416
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 

Dernier (20)

Cyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfCyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdf
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 

C Sharp Jn (2)

  • 1. Software Development Training Program KaZIM HUSSAIn
  • 2.
  • 3.
  • 4. Increment and Decrement Operator The ++ and – are increment and decrement operators. The increment operator increases its operand by one; the decrement operator decreases its operand by one. ++ --
  • 5.
  • 6.
  • 7. Examples Initial value of a Expression Final value of b Final value of a 5 b = a++ 5 6 5 b = ++a 6 6 5 b = a-- 5 4 5 b = --a 4 4
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.
  • 13.
  • 14. Binary Operators Comparison Operator Bitwise Operators Short Circuit Logical Operators & ^ | < <= > >= == != is as && ||
  • 15. Binary Operators Assignment Operators = *= /= % = += -= & = ^= |=
  • 16.
  • 17.
  • 18. Comparison Operator Operator Result == Equal to != Not equal to > Greater than < Less than >= Greater than or equal to <= Less than or equal to
  • 19.
  • 20.
  • 21.
  • 22.
  • 23.
  • 24.
  • 25.
  • 26.
  • 27.
  • 28.
  • 29.
  • 30.
  • 31. Assignment Operators = *= /= % = += -= & = ^=
  • 32.
  • 33.
  • 34.
  • 35.
  • 36. Operator Precedence Category Operators Primary (x) x.y f(x) a[x] x++ x-- new typeof sizeof checked unchecked Unary = - ! ~ ++x --x (T)x Multiplicative * / % Additive + - Shift << >> Relational < > <= >= is as Equality == != Logical And & Logical XOR ^ Logical OR | Conditional AND && Conditional OR || Conditional ?: Assignment = *= /= %= += -= <<= >>= &= ^= |=
  • 37.
  • 38.
  • 39.
  • 40.
  • 41. Math class Methods Description Example Abs(x) Returns the absolute value of x Math.Abs(-45) is 45 Math.Abs(45) is 45 Round(x) Rounds a value to the nearest integer Math.Round(4.9) is 5 Math.Round(4.2) is 4 Math.Round(4.5) is 4 Ceiling(x) Returns the smallest integer greater than or equal to the x Math.Ceiling(5.4) is 6 Math.Ceiling(5.9) is 6 Floor(x) Returns the largest integer less then or equal to x Math.Floor(5.4) is 5 Math.Floor(5.9) is 5 Max(x,y) Returns the larger of two number Math.Max(5,9) is 9 Math.Max(5,-9) is 5 Min(x,y) Returns the smaller of two number Math.Min(5,9) is 5 Math.Min(5,-9) is -9
  • 42. Math class Methods Description Example Pow(x,y) Returns x raised to the power y Math.Pow(4,2) is 16 Sqrt(x) Returns the square root of x Math.Sqrt(9) is 3 Math.Sqrt(5) is 2.23606797749979 Truncate(x) Returns the integral part of x Math.Truncate(38.4) is 38 Math.Truncate(38.485487) is 38
  • 43.