demian_thorne18 de Noviembre del 2005
PreguntaHolas, necesito ayuda para ocupar arreglos en este programa.
Tengo k ingresar 10 numeros a un arreglo y mostrar cuantos ceros hay.
igual kise hacer algo, pero no se como ocupar los arreglos.
#include <stdio.h>
#include<conio.h>
#include<string.h>
main()
{
int n,i,a[11];
printf("Ingrese un numero: ");
scanf("%d",&n);
for(i=0;i<n;i++)
arreglo[i]=0;
for(i=0;i<n;i++)
{
printf("arreglo[%d]",i);
scanf("%d",&arreglo[i]);
}
if(arreglo[i]==0)
printf("El numero ingresado es neutro");
getch();
return 0;
}
Tengo k ingresar 10 numeros a un arreglo y mostrar cuantos ceros hay.
igual kise hacer algo, pero no se como ocupar los arreglos.
#include <stdio.h>
#include<conio.h>
#include<string.h>
main()
{
int n,i,a[11];
printf("Ingrese un numero: ");
scanf("%d",&n);
for(i=0;i<n;i++)
arreglo[i]=0;
for(i=0;i<n;i++)
{
printf("arreglo[%d]",i);
scanf("%d",&arreglo[i]);
}
if(arreglo[i]==0)
printf("El numero ingresado es neutro");
getch();
return 0;
}
