/* WAP to swap the value of a and b using user defined method. */

// This code has not been compiled.
// If you find any issues, please create a new issue on GitHub regarding them.
// Go to this link to create a new issue: https://github.com/notamitgamer/bsc/issues

#include <stdio.h>

void swap(int *a, int *b)
{
    int temp = *a;
    *a = *b;
    *b = temp;
}

int main()
{
    int a, b;
    printf("Enter A and B: ");
    scanf("%d %d", &a, &b);
    printf("\nBefore swap A: %d, B: %d", a, b);
    swap(&a, &b);
    printf("\nAfter swap A: %d, B: %d", a, b);
    return 0;
}
