Free help with homework

Why join Brainly?

  • ask questions about your assignment
  • get answers with explanations
  • find similar questions

Write a program which interchanges the values the variable using only assignments operations.what is the minimum no of assignments operations required.

what is the progress on my question...???
java c++ or php which one of them?
in c language
is anybody there...???
hello... help me plzzz



This Is a Certified Answer

Certified answers contain reliable, trustworthy information vouched for by a hand-picked team of experts. Brainly has millions of high quality answers, all of them carefully moderated by our most trusted community members, but certified answers are the finest of the finest.
#include <stdio.h>
main ()
      int  a, b ;
            printf("Input a: "); scanf("%d", &a);
            printf("Input b: "); scanf("%d", &b);
            a = (a+b) ;
            printf ("values a: %d , %d\n", a, b);
            b = (a-b) ;   // now b = original value of a
            printf ("values a: %d , %d\n", a, b);
            a = (a - b ) ; // now a = original value of b
            printf ("values a: %d , %d\n", a, b);

minimum number of assignments needed = 3

0 0 0
The Brain
  • The Brain
  • Helper
Not sure about the answer?
Learn more with Brainly!
Having trouble with your homework?
Get free help!
  • 80% of questions are answered in under 10 minutes
  • Answers come with explanations, so that you can learn
  • Answer quality is ensured by our experts