Write the flowchart to interchange the value of two variables
Answers
Answered by
1
Answer:
#include<stdio.h>
int main(){
int a,b,c; //Declaring the variables
printf("Enter two variables before swapping:\n");
printf("a:");
scanf("%d",&a);
printf("b:");
scanf("%d",&b);
printf("Values stored in a:%d and b:%d",a,b);
c=a;
a=b;
b=c;
printf("\nValues after swapping a=%d and b=%d",a,b);
}
Similar questions
Chemistry,
1 day ago
Math,
1 day ago
Math,
3 days ago
Computer Science,
8 months ago
Science,
8 months ago