Created
September 13, 2018 16:23
-
-
Save LokeshKumarES/714d951c3b2c795779acaff4bd72cafa to your computer and use it in GitHub Desktop.
Write a C program to swap the two numbers.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<stdio.h> | |
#include<conio.h> | |
void main() | |
{ | |
int a, b , c; | |
printf("Enter the value of a: "); | |
scanf("%d", &a); | |
printf("Enter the value of b: "); | |
scanf("%d", &b); | |
c=a; | |
a=b; | |
b=c; | |
printf("The value of a is: %d\n", a); | |
printf("The value of b is: %d", b); | |
getch(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment