From b6002933ad46d566f728a01bf0d30b57e3f8a83c Mon Sep 17 00:00:00 2001 From: kunwardeepgujral01 <56821929+kunwardeepgujral01@users.noreply.github.com> Date: Sat, 3 Oct 2020 13:44:44 +0530 Subject: [PATCH 1/2] Just changed the layout --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 43a6b29..11e20f0 100644 --- a/README.md +++ b/README.md @@ -1 +1 @@ -# integers-addition \ No newline at end of file +# Addition of Two numbers From 61544875eb2daaa9ee6e7e2b619a165212083574 Mon Sep 17 00:00:00 2001 From: kunwardeepgujral01 <56821929+kunwardeepgujral01@users.noreply.github.com> Date: Sat, 3 Oct 2020 13:46:06 +0530 Subject: [PATCH 2/2] Updated for float numbers --- main.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/main.c b/main.c index 5bdf8b2..eb1a38c 100644 --- a/main.c +++ b/main.c @@ -2,9 +2,9 @@ int main() { -int a,b,c; -printf("enter two numbers"); -scanf("%d%d",&a,&b); +float a,b,c; +printf("Enter two numbers\n"); +scanf("%f%f",&a,&b); c=a+b; -printf("Result is %d",c); +printf("\nResult is %f",c); }