When I compile the program it seems to work normally but, when it asks for the "cuadrados", the program just stops:
int main(){
int *ptrs, suma=0, n, i, m;
printf("cuantos numeros al cuadrado quiere?: ");
scanf("%i", &n);
int numero[n], cubo[n];
*ptrs=numero
Here is when the program stops:
for(i=0;i<n;i++){
printf("escriba los cuadrados: ");
scanf("%i", numero[i]);
}
printf("Cuantos numero al cubo quiere?: ");
scanf("%i", m);
for(i=0;i<n;i++){
printf("escriba los cubos: ");
scanf("%i", cubo[i]);
}
I had this issue before but I can't understand why it does not keep running; it just asks for 1 number and then stops with no error or warning.
scanf()like the first time. Soscanf("%i", m);must bescanf("%i", &m);and similar for the arrays, I leave you to figure them out. Didn't the compiler tell you?