Absolute number means always giving positive number. The absolute number of -5 is 5. The absolute number of 5 is 5.
First let me provide you the algorithm,
- Start
- Read the number from the user
- Check if the number is negative
- If the number is negative, then multiply it by -1 to get its absolute value
- Print the absolute value of the number
- End
0 Comments