• RSS
  • Facebook
  • Twitter

One Center for all the Testing Need. OneTestingCenter is for all, for all QA, for all Automation. Automation is easy, fun and enriching experience. Happy Learning and Happy Testing!

  • Access to All QA

    At OneTestingCenter, you find lots of books,articles,blogs and detailed guides. Everyone has access to QA. Happy Learning, Happy Testing.

  • Global Trainings

    All the QA/Auotmation trainings are available at OneTestingCenter. QA, Automation, QTP/UFT, Selenium, LoadRunner, QC/ALM, Appium...

  • Automation Learning Fun

    Technology is always evolving. Automation is always challenging. To be frank, Automation is fun, enthusiastic and enrching experience.

    Swapping two numbers without a temporary variable

    '‘**************************************************************************
    ‘Swapping any two numbers without a temporary variable
    '‘**************************************************************************

    Dim Num1
    Dim Num2

    Num1=InputBox ("Enter Num1")
    Num2=InputBox ("Enter Num2")
    Print (" Before Swapping Num1 Value:" & Num1)
    Print (" Before Swapping Num2 Value:" & Num2)

    Num1=Num1-Num2
    Num2=Num1+Num2
    Num1=Num2-Num1
    Print (" After Swapping Num1 Value:" & Num1)
    Print (" After Swapping Num2 Value:" & Num2)

    Results window

    Reactions:

    Swapping two numbers without a temporary variable

    Swapping two numbers without a temporary variable

    '‘**************************************************************************
    ‘Swapping any two numbers without a temporary variable
    '‘**************************************************************************

    Dim Num1
    Dim Num2

    Num1=InputBox ("Enter Num1")
    Num2=InputBox ("Enter Num2")
    Print (" Before Swapping Num1 Value:" & Num1)
    Print (" Before Swapping Num2 Value:" & Num2)

    Num1=Num1-Num2
    Num2=Num1+Num2
    Num1=Num2-Num1
    Print (" After Swapping Num1 Value:" & Num1)
    Print (" After Swapping Num2 Value:" & Num2)

    Results window