#include <stdio.h>

/*
******************************************************
Pre-sessional learning for iBSc students
Programming and electronics, Section 2, Extension task
******************************************************

Note:
    Although this script is prepared in C, the code defined in the main() function
    should be compatible with the Arduino-specific language (which is a variant of C).
    To execute, you need to carefully integrate the code defined in main() to your
    Arduino IDE.

Version history:
    Date            Programmer      Description
    ----------      ----------      ----------------------------
    23/08/2024      B LI            create
*/


int main(){
// implement the following to your Arduino IDE

    int a, b, temp;

    a = 1;
    b = 2;
    // alternatively, you can use scanf() function to take user input

    printf("before swiping: a = %d, b = %d \n", a, b);

    temp = a;
    a = b;
    b = temp;

    printf("after swiping: a = %d, b = %d \n", a, b);

    return 0;
}
