C program to swap two numbers without temporary variable
C program to swap two numbers without temporary variable
#include<stdio.h>
#include<conio.h> void main() { float a,b; printf("Enter a and b\n"); scanf("%f%f",&a,&b); printf("Before swap,a=%f,b=%f\n",a,b); a=a+b,b=a-b,a=a-b; printf("After swap, a=%f,b=%f",a,b); getch(); }