fork download
  1. #include<stdio.h>
  2. #include<stdlib.h>
  3.  
  4. int main() {
  5. int t[20],N;
  6. /*t[0]=5;
  7.   t[2]=10;
  8.   printf("%d",t[2]);*/
  9. printf("Enter values of your table :");
  10. scanf("%d",&N);
  11. for( int i=0 ; i<=N ;i++) {
  12. printf("Enter the value [%d]",i+1);
  13. scanf("%d",&t[i]);
  14. }
  15. }
  16.  
Success #stdin #stdout 0s 5528KB
stdin
Standard input is empty
stdout
Enter values of your table :Enter the value [1]