A program to swap two variables without using third variable.

Veröffentlicht am: 09 August 2019
auf dem Kanal: Sunita Panthi
39
6

A program to swap two variables entered by the user without using third variable. Learn coading, keep going and increasing knowledge.

Here is the code:
void main()
{
int a,b;
printf("Enter the first number\t");
scanf("%d",&a);
printf("Enter the second number\t");
scanf("%d",&b);
printf("\nThe numbers before swapping are first=%d and second=%d",a,b);
a=a+b;
b=a-b;
a=a-b;
printf("\nThe numbers after swapping are first=%d and second=%d",a,b);
getch();
}


Auf dieser Seite können Sie das Online-Video A program to swap two variables without using third variable. mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer Sunita Panthi 09 August 2019 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 39 Mal angesehen und es wurde von 6 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!