Basic Programming of c 




List of Experiments 


Sequential control statement

Write a program to swap two numbers

-----------------------------------------------------------------------------------

#include<stdio.h>

#include<conio.h>

void main()

{

int a,b,temp;

printf("Enter the value of a \t");

scanf("%d",&a);

printf("Enter the value of b \t");

scanf("%d",&b);

temp=a;

a=b;

b=temp;

printf("After swapping a %d \t \n",a);

printf("After swapping b %d \t",b);


getch();

}

-----------------------------------------------------------------------------------

Copy code from here:-