Arithmetic operators are used for writing logic. The operators are
+ means addition
- means subtraction
* means multiplication
/(slash or by) means division gives quotient value.
%(modulus)gives remainder value.
+ means addition
- means subtraction
* means multiplication
/(slash or by) means division gives quotient value.
%(modulus)gives remainder value.
Write a program to perform addition of two decimal values.
output
B O D M A S rule
[ Brackets [first preference]
( Of [second preference]
/ Division % remainder [third preference]
* Multiplication [fourth preference]
+ Addition [fifth preference]
- Subtraction [sixth preference]
Write a program using arithmetic operations and BODMAS rule.
output




No comments:
Post a Comment