Facebook
From Reliable Motmot, 2 Years ago, written in C.
Embed
Download Paste or View Raw
Hits: 267
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4. int main()
  5. {
  6.     int i,n;
  7.     printf("Jaka dlugosc ma miec tablica?");
  8.     scanf("%d",&n);
  9.     int array[n];
  10.     for(i=0;i<n;i++)
  11.     {
  12.         array[i] = i +1;
  13.     }
  14.     for(i=0;i<n;i++)
  15.     {
  16.         printf("%d element  to: %dn",i,array[i]);
  17.     }
  18. }
  19.