Ver Mensaje Individual
  #4 (permalink)  
Antiguo 13/04/2016, 13:10
Avatar de cofiykiki
cofiykiki
 
Fecha de Ingreso: abril-2016
Mensajes: 2
Antigüedad: 8 años, 1 mes
Puntos: 0
Respuesta: Arreglos unidimensionales

ya mejore el programa solo que ahora no me compila en el getche

ERRORES:
[Error] expected constructor, destructor, or type conversion before ';' token
[Error] expected declaration before '}' token

CODIGO CORREGIDO

#include <conio2.h>
#include <stdio.h>
#include <math.h>

int i, n, op, A[10];
void menu();
void opcion1();
void opcion2();

main()
{
menu();
do
{
switch(op)
{
case 1: opcion1();break;
case 2: opcion2();break;
}
}
while(op!=11);
}

void menu()
{
gotoxy (10,5); printf("MENU DE VECTORES");
gotoxy (10,7); printf("1.- LECTURA DEL VECTOR A");
gotoxy (10,8); printf("2.- GENERA VECTOR B");
}

void opcion1()
{
clrscr();
gotoxy (10,10); printf("1.- LECTURA DEL VECTOR A");
gotoxy (10,11); printf("¿CUAL ES EL TAMAÑO DEL VECTOR?");
scanf("%d", &A[10]);
}
getche();
}

GRACIAS POR SUS RESPUESTAS