A program to swap two variables without using third variable.

Publicado em: 09 Agosto 2019
no canal de: 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();
}


Nesta página do site você pode assistir ao vídeo on-line A program to swap two variables without using third variable. duração hora minuto segundo em boa qualidade , que foi baixado pelo usuário Sunita Panthi 09 Agosto 2019, compartilhe o link com seus amigos e conhecidos, no youtube este vídeo já foi visto 39 vezes e gostou 6 espectadores. Boa visualização!