add a number to a table langage c
#include <stdio.h>
int main(void) {
int i,n,x,t[n],tab[n];
printf("How long do you want your table? :");
scanf("%d",&n);
for (i=0;i<n;i++){
printf("enter the %d number :",i+1);
scanf("%d",&t[i]);
}
printf("What number do you want to add to the table? :");
scanf("%d",&x);
printf("the new tab is : \n");
for (i=0;i<n;i++){
tab[i]=t[i]+x;
printf("%d\n",tab[i]);
}
return 0;
}