From a28e83e1abbd98777514abc9780bc78f690edf34 Mon Sep 17 00:00:00 2001 From: Aastha Saxena Date: Fri, 4 Oct 2019 20:25:02 +0530 Subject: [PATCH] For decimal numbers --- yoyo | 15 ++++++++------- ~$yoyo | Bin 0 -> 162 bytes 2 files changed, 8 insertions(+), 7 deletions(-) create mode 100644 ~$yoyo diff --git a/yoyo b/yoyo index 9b52e86..fdd860b 100644 --- a/yoyo +++ b/yoyo @@ -1,12 +1,13 @@ #include void main() { -int a,b; -printf("enter value of a and b"); -scanf("%d",&a,&b); -a=a+b; -b=a-b; -a=a-b; -printf("%d",a,b); + float a,b; + printf("enter value of a and b"); + scanf("%f",&a,&b); + a=a+b; + b=a-b; + a=a-b; + printf(“the swapped values are”); + printf("%f",a,b); getch(); } diff --git a/~$yoyo b/~$yoyo new file mode 100644 index 0000000000000000000000000000000000000000..eb6bca51064b888bb1f01b5cc88f42e49e14bb33 GIT binary patch literal 162 zcmd;b%*oGI@Gi|wEMg!Ya4|SC