Ver Mensaje Individual
  #1 (permalink)  
Antiguo 14/07/2009, 18:04
matiasbke
 
Fecha de Ingreso: julio-2009
Mensajes: 1
Antigüedad: 14 años, 10 meses
Puntos: 0
como insertar codigo en menu

include <stdio.h>
#include<conio.h>


int main()
{
int cantidad, i; // Cantidad de numero a ingresar

printf("ingrese la cantidad de numeros: \n");
scanf("%d",&cantidad);

int A[10],par=0,Positivo=0,Negativo=0;
int Cero=0;

for (i=0;i<cantidad;i++)
{
printf("ingrese el numero %d: \n",i);
scanf("%d",&A[i]);
}

for (int j=0;j<cantidad;j++)
{

if(A[j]<0)
Negativo++;
else
Positivo++;

if (A[j]%2==0)
par++;

if(A[j]==0)
Cero++;

}


printf("los numeros pares son: %d \n",par);
printf("los numeros Positivos son: %d \n",Positivo);
printf("los numeros Negativos son: %d \n",Negativo);
printf("los numeros igual a 0 son:%d \n", Cero);

getch();
return (0);
}

ese el codigo pero necesito hacerle un menu con gotoxy
que al presionar 1 me haga todo ese codigo ,de la siguiente forma

____________
menu
____________
1.calcular numero
2.salir
____________
ingresar opcion:



gracias