Write a program to input two unequal numbers. Display the numbers after swapping their values in the variables without using a third variable. Sample Input: a=76, b=65 Sample Output: a=65, b=75
Added by Brandon F.
Step 1
Start by taking input of two unequal numbers a and b. Show more…
Show all steps
Your feedback will help us improve your experience
Samuel Goyette and 99 other AP CS educators are ready to help you.
Ask a new question
Labs
Want to see this concept in action?
Explore this concept interactively to see how it behaves as you change inputs.
Key Concepts
Recommended Videos
Write a problem that can be solved by finding the difference between two numbers. At least one of the numbers should be negative. Then explain how to solve the problem.
Variables, Real Numbers, and Mathematical Models
Subtraction of Real Numbers
Use each of the variables $a, b, c,$ and $d$ only once to write: a. a sum of two differences b. a difference of two sums
A Review of Basic Algebra
The Language of Algebra
Write pseudo code that will calculate running SUM; A user will enter numbers that will be added t0 the sum and when negative number is encountered, stop adding numbers and write Out the final result:' In C++
Chandra J.
Recommended Textbooks
Computer Science and Information Technology
Introduction to Programming Using Python
Computer Science - An Overview
Watch the video solution with this free unlock.
EMAIL
PASSWORD