From 93abfc7f4e948bb10712dacb239dd96c950e1e44 Mon Sep 17 00:00:00 2001 From: peddireddyhariharan <52133743+peddireddyhariharan@users.noreply.github.com> Date: Sun, 23 Jun 2019 22:23:13 +0530 Subject: [PATCH] Update 30p.c (#10) --- 30p.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/30p.c b/30p.c index f506bc0..ffbf41e 100644 --- a/30p.c +++ b/30p.c @@ -1,15 +1,15 @@ #include int main() { - int i, x[6], sum = 0; + int a, x[6], sum = 0; printf("Enter 6 numbers: "); - for(i = 0; i < 6; ++i) + for(a = 0; a < 6; ++a) { - scanf("%d", x+i); + scanf("%d", x+a); - sum += *(x+i); + sum += *(x+a); } printf("Sum = %d", sum); return 0;