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 Volume of given box in java

class volume { public static void main (String args []) { int l=5,b=6,h=10; int volume; volume=l*b*h; System.out.println (" vol...