Título: ¿Que hice mal?. Arreglos(SOLUCIONADO) Publicado por: ProyectoX en 12 Diciembre 2012, 17:37 pm #include <stdio.h>
#include <stdlib.h> #include <conio.h> #define TAMANIO 5 void imprimeArreglo(const int b[]); int main() { int a[TAMANIO]; int i; for(i=0;i<TAMANIO;i++){ a=i+1; } imprimeArreglo(a); } void imprimeArreglo(const int b[]) { int i; for (i=0;i<TAMANIO;i++) { if (i==3){ printf("%3d*",b); } else { printf("%3d",b); } getch(); } } ME FALTABA UN = EN LA CONDICION IF, SOLUCIONADO!! IMPRIME POR PANTALLA *4 *4 *4....etc... Y yo quiero que imprima por pantalla 1 2 3 *4, solo quiero que marque con un asterisco el elemento b[3], pero que tambien muestre los elementos anteriores y no se porque no va hacia ELSE, cuando la condicion en IF es falsa. Título: Re: ¿Que hice mal?. Arreglos(SOLUCIONADO) Publicado por: leosansan en 13 Diciembre 2012, 16:00 pm Código Saluditos!. |