From 21d75fcff806f81aa3e1ecb358760199cd63fe2e Mon Sep 17 00:00:00 2001 From: CO18344 <42909454+CO18344@users.noreply.github.com> Date: Wed, 30 Oct 2019 18:31:05 +0530 Subject: [PATCH] Create swap.c this code removes the errors of program written in "yoyo" file. Problem was in scanf and printf functions --- swap.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 swap.c diff --git a/swap.c b/swap.c new file mode 100644 index 0000000..8252b8a --- /dev/null +++ b/swap.c @@ -0,0 +1,15 @@ +#include +void main() +{ + + int a,b; + printf("enter value of a and b: "); + scanf("%d %d",&a,&b); + + a=a+b; + b=a-b; + a=a-b; + + printf("%d %d",a,b); +getch(); +}