c program

Write a C program to interchange two numbers.
 
 
     #include <stdio.h>
   
    int main()
    {
      int x, y, t;
   
      printf("Enter two integers\n");
      scanf("%d%d", &x, &y);
   
      printf("Before Swapping\nFirst integer = %d\nSecond integer = %d\n", x, y);
   
      t = x;
      x = y;
      y = t;
   
      printf("After Swapping\nFirst integer = %d\nSecond integer = %d\n", x, y);
   
      return 0;
    }
 

Comments

Popular posts from this blog

program that compresses windows BMP image file using java

react-native multiselect dropdown