| Ver tema anterior :: Ver siguiente tema | | Autor | Mensaje |
|---|
managermin
Registrado: 25 Abr 2012 Mensajes: 1
| Publicado: 25/04/2012 6:11 pm | | | Título: Inconvenientes Ejecucion Progama |
| Buenas Noches
A continuacion me refiero a ustedes para solictar ayuda ya que estoy tratando de copilar este codigo y no funcion me podrian ayudar por favor
#include<stdio.h> #include<conio.h> #include<stdlib.h> #include<string.h> typedef struct stRegistro{ char nombre[15]; int edad; }; /////////////////////////////////////////////////////////////////////////////// typedef struct Arbol{ struct stRegistro dato; struct Arbol* hijo_izq; struct Arbol* hijo_der; }; /////////////////////////////////////////////////////////////////////////////// int crearNodo(struct Arbol **nuevo, struct stRegistro valor); int insertarHoja(struct Arbol * arbol, struct stRegistro valor); int insertarArbol(struct Arbol **arbol, struct stRegistro valor); void InOrden(struct Arbol * arbol); int ordenar(); int anadir(); void Listar(); //strcmp(); int clave = 0; //////////////////////////////////////////////////////////////////////////////// main() { char opcion[1]; int opcionCampo=0; do { system("cls"); printf("\n\n * ___________________________________\n\n *"); printf("\n\n * Estructura Datos – Elige opcion\n *"); printf("\n\n * ___________________________________\n\n *"); printf("\n\n * 1) Insertar Registro\n *"); printf("\n\n * 2) Quién es el miembro de la familia con mayor edad\n *"); printf("\n\n * 3) Cuántos miembros son menores de edad \n *"); printf("\n\n * 4) Imprimir los nombres x orden ascendente \n *"); printf("\n\n * 0) Salir \n *"); printf("\n\n * Opcion: *"); gets(opcion); if(opcion == 0 ) { printf("\n\n * * * G R A C I A S * * \n\n\n *"); system("PAUSE") ; system("exit"); } switch (atoi(opcion)) { case 1: anadir(); break; case 2: system("cls"); printf("____________________________________________\n\n *"); printf(" Insertar registro \n"); printf("____________________________________________\n\n"); printf(" Nombre Edad \n\n"); Listar(); system("PAUSE"); break; case 3:// Ordenar por campo do { system("cls"); printf("________________________\n\n"); printf(" Ordenar por campo\n"); printf("_________________________\n\n"); printf(" 1) Ordenar por nombre\n"); printf(" 2) Ordenar por edad \n"); printf(" Opcion: "); scanf("%d",&opcionCampo); if(opcionCampo == 1) { clave = 1; system("cls"); printf("\n\n\n\t CAMPO ORDENADO POR NOMBRE \n\n\n"); system("PAUSE"); system("cls"); printf("____________________________________________\n\n"); printf(" REGISTRO\n"); printf("____________________________________________\n\n"); printf(" Nombre Edad \n\n"); ordenar(); printf("\n"); system("PAUSE"); opcionCampo=-1; main(); } if(opcionCampo == 2) { clave = 2; system("cls"); printf("\n\n\n\t\tCAMPO ORDENADO POR EDAD\n\n\n"); system("PAUSE"); system("cls"); printf("____________________________________________\n\n"); printf(" REGISTRO\n"); printf("____________________________________________\n\n"); printf(" Nombre Edad \n\n"); ordenar(); printf("\n"); system("PAUSE"); opcionCampo=-1; main(); } printf("Fin del proyecto"); return 0; } } |
| | Volver arriba | |  | | |
| No puede crear mensajes No puede responder temas No puede editar sus mensajes No puede borrar sus mensajes No puede votar en encuestas
|
|
| |