A program to swap two variables without using third variable.

Pubblicato il: 09 agosto 2019
sul canale di: 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();
}


In questa pagina del sito puoi guardare il video online A program to swap two variables without using third variable. della durata di ore minuti seconda in buona qualità , che l'utente ha caricato Sunita Panthi 09 agosto 2019, condividi il link con amici e conoscenti, su youtube questo video è già stato visto 39 volte e gli è piaciuto 6 spettatori. Buona visione!