Question: Create a script that will find the difference between two integers in your script and display result. The difference needs to be a positive number.
Create a script that will find the difference between two integers in your script and display result. The difference needs to be a positive number. In other words, if the first number is larger than the second number, perform "first number second number". If it is the other way around, perform "second number first number".
Take for example, if
int Num and int Num
the output should be
Num and Num Difference is
Also,
int Num and int Num
the output should be
Num and Num Difference is
Do this by using If Else Statement.
Save as homeworkAc
Do this by using Ternary Operator.
Save as homeworkBc
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
