Recent Posts

9-latest-250px-course

Write a C program to swap Two Numbers Without Using Third Variable

Write a C program to swap Two Numbers Without Using Third Variable 



Program:-     

#include<stdio.h>

int main()

{
    int a, b;

    printf("Enter two numbers: ");

    scanf("%d %d", &a, &b); 

    a = a + b;
  
    b = a - b;  

    a = a - b;  

    printf("Numbers after swapping: %d %d", a, b);

}

Output:-

....
SHARE

Milan Tomic

Hi. I’m Designer of Blog Magic. I’m CEO/Founder of ThemeXpose. I’m Creative Art Director, Web Designer, UI/UX Designer, Interaction Designer, Industrial Designer, Web Developer, Business Enthusiast, StartUp Enthusiast, Speaker, Writer and Photographer. Inspired to make things looks better.

  • Image
  • Image
  • Image
  • Image
  • Image
    Blogger Comment
    Facebook Comment

0 comments:

Post a Comment