Tuesday, 22 May 2018

Program to find swap of two variables in c

/* program to swap of two variable */
# include < stdio.h >
void main ()
{
int a,b ;
clrscr () ;
printf ("\n enter the value of a:") ;
scanf ("%d",& a) ;
printf ("\n enter the value of b:") ;
scanf ("%d",& b) ;
c = a ;
a = b ;
b = c ;
printf ("\n swap =%d", a) ;
printf ("\n swap =%d", b) ;
getch () ;
}

No comments:

Post a Comment

Featured post

Program to find maximum of three number using user define function in C++

A function can be define by the user as per the requirement of the user or programmer . To implement a user define function , a programmer ...