Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

Swapping Two Numbers Using Third Variable

   public static void main(String[] args) {
        int x = 10;
        int y = 20;
        int temp;

        temp = x;
        x = y;
        y = temp;

        System.out.println("x:"+x  +" y:" + y);
    }
Source by www.javatpoint.com #
 
PREVIOUS NEXT
Tagged: #Swapping #Two #Numbers #Using #Third #Variable
ADD COMMENT
Topic
Name
8+3 =