Arithmetic Operators in Java

Pubblicato il: 22 dicembre 2022
sul canale di: BitsNBytes
75
8

Class Code:
https://github.com/BitsNBytes101/Java...

Games to Learn Programming.
https://www.codemoji.com/lessons/java...
https://scratch.mit.edu/projects/edit...

Notes:
What are Arithmetic operators:
Arithmetic operators are symbols(+,-,*,/,%,) that we use to perform basic math
operations like addition, multiplication, division, and modulus operation.
Why we need them.
When we build real-life programs like a program that can automatically
perform testing of a website for us or a game, we often need
to perform these basic math operations. we use these operators to perform
these basic calculations.
How can we use Arithmetic operators:
We can use them to perform operations directly on numbers.
Like System.out.println(10+10) // 20, or we
can use them with variables we can print the results can store
them in variables etc.

Modulus operator:
It gives us the remainder for example if we divide a number and the number is
not completely divisible we will get the remaining part
let's do an example 5/2 answer is 1 and remainder is 1
you can also think about it there are 5 slices of pizza that you want
to divide between two friends completely how many pieces they will get
and how much will be left


In questa pagina del sito puoi guardare il video online Arithmetic Operators in Java della durata di ore minuti seconda in buona qualità , che l'utente ha caricato BitsNBytes 22 dicembre 2022, condividi il link con amici e conoscenti, su youtube questo video è già stato visto 75 volte e gli è piaciuto 8 spettatori. Buona visione!