Search:

Submit Article

# PROGRAM TO READ NUMBERS, N1 AND N2 ARE INTERCHANGE WITHOUT USING EXTRA VARIABLES.N1=10, N2=20 THEN O/P IS N1=20, N2=10 USING MULTIPLICATION, DIVISION

Posted By: Christine Roberts     Category: C Programming     Views: 4855

## Code for PROGRAM TO READ NUMBERS, N1 AND N2 ARE INTERCHANGE WITHOUT USING EXTRA VARIABLES.N1=10, N2=20 THEN O/P IS N1=20, N2=10 USING MULTIPLICATION, DIVISION in C Programming

```#include<stdio.h>
#include<conio.h>
void main()
{
int a,b;
clrscr();
printf("\n Enter The Value of A: ");
scanf("%d",&a);
printf("\n Enter The Value of B: ");
scanf("%d",&b);

a = a*b;
b = a/b;
a = a/b;
clrscr();
printf("\n\t\t According to *,/ sign : \n");
printf("\n\t\t Value of A %d ",a);
printf("\n\t\t Value of B %d ",b);

getch();
}

****************************** INPUT *********************************

Enter The Value of A: 45

Enter The Value of B: 25

****************************** OUTPUT *********************************

According to  sign :

Value of A 25
Value of B 45

************************************************************************```
Share:

 Christine Roberts author of PROGRAM TO READ NUMBERS, N1 AND N2 ARE INTERCHANGE WITHOUT USING EXTRA VARIABLES.N1=10, N2=20 THEN O/P IS N1=20, N2=10 USING MULTIPLICATION, DIVISION is from Hartford, United States. View All Articles

 Please enter your CommentComment should be atleast 30 Characters.Please put code inside [Code] your code [/Code]. No Comment Found, Be the First to post comment!