C Program
#include<stdio.h> void main() {
int a,b; printf("Enter first number, a:"); scanf("%d",&a); printf("Enter second number, b:"); scanf("%d",&b); printf("values of a and b before swapping is a=%d,b=%d",a,b); /*swapping*/ a=a+b; b=a-b; a=a-b; printf("value of a and b after swapping is a=%d,b=%d"a,b); }
No comments:
Post a Comment