A program to swap two variables without using third variable.

Publicado el: 09 agosto 2019
en el 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();
}


En esta página del sitio puede ver el video en línea A program to swap two variables without using third variable. de Duración hora minuto segunda en buena calidad , que subió el usuario Sunita Panthi 09 agosto 2019, comparta el enlace con amigos y conocidos, en youtube este video ya ha sido visto 39 veces y le gustó 6 a los espectadores. Disfruta viendo!