how can I fill this array of 10 elements with odd numbers? Thank you
Code:#include <stdio.h> main () { int a[10]; int b,i; a[0]=1; for (b=0;b<9;b++) { a[i] = a[i]+2; } for (b=0;b<10;b++) { printf ("%d\n", a[i]); } }
how can I fill this array of 10 elements with odd numbers? Thank you
Code:#include <stdio.h> main () { int a[10]; int b,i; a[0]=1; for (b=0;b<9;b++) { a[i] = a[i]+2; } for (b=0;b<10;b++) { printf ("%d\n", a[i]); } }