From 38a0d9a847cdf480bdaa6ed0b3dba21ca0542cff Mon Sep 17 00:00:00 2001 From: khageshwor <54597325+khageshwor@users.noreply.github.com> Date: Mon, 2 Nov 2020 18:52:19 +0545 Subject: [PATCH] Update Program to get correct output Change solution to get output from n to 1 --- Basics/15.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Basics/15.c b/Basics/15.c index 3bd4f62..c4af1d7 100644 --- a/Basics/15.c +++ b/Basics/15.c @@ -6,7 +6,7 @@ int main() printf("Enter the value of N\t"); scanf("%d",&n); do{ - printf("%d\n",i); - i++; + printf("%d\n",n); + n--; }while(i<=n); }