w3ajay

tally tutorial point, ms word 2013, ms excel 2013, ms powerpoint 2010,ccc question with answer in hindi 2021, Tally Prime in hindi , tally prime,Python,in python,programming in python,python

Tuesday, December 24, 2019

C Program to swap two numbers without third variable

C Program to swap two numbers without third           variable


  1. #include<stdio.h>
  2. #include<conio.h>  
  3.  void  main()    
  4. {    
  5. int a, b;
  6. clrscr();      
  7. printf(" enter the  two number for swapping"); 
  8. scanf("%d%d",&a,%b);     
  9. a=a+b;   
  10. b=a-b;   
  11. a=a-b;  
  12. printf("\nAfter swap a=%d b=%d",a,b);    
  13. getch();  
  14. }   

1 comment:

for more information please share like comment and subscribe