This document describes a programming exercise to swap the values of two variables without using a third variable. The program takes input values for two numbers, swaps their values using arithmetic operations, and prints the output showing the swapped values. The result demonstrates that swapping two numbers without a third variable was successful.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
14 views2 pages
Java Number Swapping Without Variable
This document describes a programming exercise to swap the values of two variables without using a third variable. The program takes input values for two numbers, swaps their values using arithmetic operations, and prints the output showing the swapped values. The result demonstrates that swapping two numbers without a third variable was successful.