C PROGRAMMING

Monday, 8 June 2015

5.Aim - WAP To Swap Two Numbers Using Third Variable
Code-

#include<stdio.h>
#include<conio.h>
void main()
{
 int a,b,c;
 clrscr();
 printf("Enter The Value Of a and b respectively : ");
 scanf ("%d%d",&a,&b);
 c=a+b;
 b=c-b;
 a=c-b;
 printf("\nThe Values Of a and b After Swapping is %d %d",a,b);
 getch();
}

OUTPUT
Enter The Values Of a and b respectively : 35  93
The Values Of a and b After Swapping is 93 & 35






Posted by sonu at 08:52
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest

No comments:

Post a Comment

Newer Post Older Post Home
Subscribe to: Post Comments (Atom)

Blog Archive

  • ▼  2015 (15)
    • ▼  June (15)
      • Aim - WAP To Find Smallest and Largest Among Four...
      • Aim – WAP To Reverse a 5-digit Number and Check ...
      • Aim – WAP To Find The First Day of the YearCode ...
      • Aim- WAP To Check Whether Entered Number Is Odd...
      • Aim – WAP To Compare Two Numbers And Print The ...
      • Aim - WAP To Reverse Four Digit Number Code- #in...
      • Aim - Calculate The Sum & Percentage Of Marks Ob...
      • wap To Print Value One less than & One More Than ...
      • -     To print ASCII value of Entered Character ...
      • 5.Aim - WAP To Swap Two Numbers Using Third Vari...
      • 4.Aim - WAP To Swap Two Numbers Without Using Th...
      • 3.Aim -WAP To Perform Various Arithmetic operati...
      • 2.Aim -  WAP To Convert Celsius Into Farenheit ...
      •  1 Programming: Aim -  Wap to print hello. ...
      •   
Simple theme. Powered by Blogger.