[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 379: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions_content.php on line 678: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions_content.php on line 678: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/session.php on line 1042: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4688: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4690: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4691: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4692: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
DOEACC FORUM • View topic - PROJECT: Swaping in Two Variables

PROJECT: Swaping in Two Variables

Learn and Trouble Shoot Problems Related to C-Language here.

PROJECT: Swaping in Two Variables

Unread postby rajeevmahura » Thu May 22, 2008 6:03 pm

#include<stdio.h>
#include<conio.h>
void main()
{
int a,b;
clrscr();
printf("Enter Any Number For a:- ");
scanf("%d",&a);

printf("Enter Any Number For b:- ");
scanf("%d",&b);

printf("\nAfter Swaping\na= %d\nb= %d",a,b);

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

printf("\nBefore Swaping\na= %d\nb= %d",a,b);
getch();
}
----------------------------------
Input: a=4,b=6
Output:After Swaping
a= 4
b= 6
Before Swaping
a= 6
b= 4
--Regards--
Rajeev Mahura
Servers & Storage Professional
http://about.me/rajeevmahura
User avatar
rajeevmahura
 
Posts: 144
Joined: Tue May 20, 2008 5:22 pm
Location: Bangalore | New Delhi
Full Name:
Date Of Birth: 15 Jan 1984
Address:
Profession: DOEACC Trainer
DOEACC Center: DOEACC DELHI
Mobile No: 0

Return to C-Language

Who is online

Users browsing this forum: No registered users and 1 guest

cron