Created
July 30, 2012 15:40
-
-
Save colltoaction/3207904 to your computer and use it in GitHub Desktop.
Problemas con C
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// *** funciona *** | |
#include <stdio.h> | |
#define MAX 2 | |
int main(){ | |
int vector[MAX]; | |
for (int i=0; i<=MAX; i++){ | |
int a; | |
printf("Ingrese un numero:"); | |
scanf("%i", &a); | |
printf("i es %i", i); | |
} | |
return 1; | |
} | |
// *** no funciona *** | |
#include <stdio.h> | |
#define MAX 2 | |
int main(){ | |
int vector[MAX]; | |
for (int i=0; i<=MAX; i++){ | |
int a; | |
printf("Ingrese un numero:"); | |
scanf("%i", &a); | |
vector[i] = a; | |
printf("i es %i", i); | |
} | |
return 1; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment