Skip to content

Commit

Permalink
Update 30p.c (ajay-prabhakar#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
peddireddyhariharan authored and ajay-prabhakar committed Jun 23, 2019
1 parent 592cd0e commit 93abfc7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions 30p.c
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
#include <stdio.h>
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;
Expand Down

0 comments on commit 93abfc7

Please sign in to comment.