/******************************************************************************
Welcome to GDB Online.
GDB online is an online compiler and debugger tool for C, C++, Python, Java, PHP, Ruby, Perl,
C#, VB, Swift, Pascal, Fortran, Haskell, Objective-C, Assembly, HTML, CSS, JS, SQLite, Prolog.
Code, Compile, Run and Debug online from anywhere in world.
*******************************************************************************/
#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
int
main(void)
{
size_t n;
printf("Entrez la taille du tableau : ");
if (scanf("%zu", &n) != 1)
{
printf("Erreur lors de la saisie\n");
return EXIT_FAILURE;
}
int tab[n];
for (size_t i = 0; i < n; ++i)
{
tab[i] = i * 10;
printf("tab[%zu] = %d\n", i, tab[i]);
}
return 0;
}