google-site-verification: googlef8aa845b858144d3.html COMPUTER SCIENCE NOTES: Swapping: (Example 1) C program to swap two numbers using third variable...

Thursday, March 2, 2017

Swapping: (Example 1) C program to swap two numbers using third variable...

/* 1 program of swap 2 number */
#include<stdio.h>
#include<conio.h>
void main()
{
int a,b,t;
clrscr();
printf("Enter a number for a :");
scanf("%d",&a);
printf("Enter a number for b :");
scanf("%d",&b);
t=a, a=b, b=t;
printf("value of a=%d\nvalue of b=%d",a,b);
getch();
}








No comments:

Post a Comment