Question1:
I want to make below stuff in a loop. I want to make variable name a1,a2 ... to a10
In this each element equal to 1,2,3 to 10.
ie.. a1 = 1,a2 =2 ...a10 =10;
and i want to count 1 to 10 . Size of array gonna be 10 .
How to make this program in loop?
#include <stdio.h>
int main(){
long long n;
int count = 0;
for( i = 1; i <10 ; i++ )
{
n /= 10;
++count;
}
printf("Number of digits: %d", count);
}
Upper code doesn't work for a1 ,a2 to a10 . How to make variable a + i ? that represent a1 a2 ..a10 euqal to to number a + i = i; ??
I try to embed a picture here, it says I can't use picture .
Here is link : i.imgur.com/viYuPUH.png
Kindly let me know, if question is not clear ?
=========== sorry , i dont know that only 1 question is allowed to ask, so i'm asking here.