Skip to content

Developed by shraddhatech16 , In this code we are not using any temporary variable Instead of that we have to just make equations which contains a&b With the help of these three equations i.e. 1.a=a+b ,b=a-b , & a=a-b we can run the program and swap the no.s

Notifications You must be signed in to change notification settings

shraddhatech16/swapping-of-no.s-without-temperory-variable

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

#include<stdio.h> #include<stdlib.h> int main() { int a, b ; printf("Enter the two values to swap\n"); scanf("%d%d" ,&a ,&b); printf("before swappimg a= %d and b= %d" ,a,b );

}

About

Developed by shraddhatech16 , In this code we are not using any temporary variable Instead of that we have to just make equations which contains a&b With the help of these three equations i.e. 1.a=a+b ,b=a-b , & a=a-b we can run the program and swap the no.s

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published