Está en la página 1de 4

#include "stdio.

h"
#include "conio.h"
#include "dos.h"
#include "\fuentes\menu1.cpp"
#include "\fuentes\menu2.cpp"
#include "\fuentes\menu3.cpp"
int main()
{ int op;
textbackground(3);
textcolor(14);
clrscr();
do {
do {
clrscr();
gotoxy(25,7); printf("MENU PRINCIPAL");
gotoxy(17,10), printf(" 1. SUBMENU DE PROGS LINEALES");
gotoxy(17,12), printf(" 2. SUBMENU DE PROGS RAMIFICADOS");
gotoxy(17,14), printf(" 3. SUBMENU DE PROGS REPETITIVOS");
gotoxy(17,16), printf(" 4. FIN DE PROCESO");
gotoxy(17,20), printf(" Cual es tu opcion?: ");
scanf("%d",&op);
} while (op < 1 || op > 4);
switch (op)
{case 1:
clrscr();
menu1();
break;
case 2:
clrscr();
menu2();
break;
case 3:
clrscr();
menu3();
break;
case 4:
textcolor(LIGHTBLUE + 128);
clrscr();
gotoxy(25,12);
cprintf("FIN DE PROCESO,...");
break;
}
delay(3000);
} while (op != 4);
}

#include "stdio.h"
#include "conio.h"
#include "dos.h"

#include "\fuentes\energia.c"
//...
int menu1()
{ int op, valor;
textbackground(3);
textcolor(14);
clrscr();
do {
do {
clrscr();
gotoxy(25,7); printf("MENU DE PROGRAMAS LINEALES");
gotoxy(17,10), printf(" 1. ENERGIA CINETICA");
gotoxy(17,12), printf(" 2. PROG2");
gotoxy(17,14), printf(" 3. PROG3");
gotoxy(17,16), printf(" 4. PROG4");
gotoxy(17,18), printf(" 5. Terminar");
gotoxy(17,20), printf(" Cual es tu opcion?: ");
scanf("%d",&op);
} while (op < 1 || op > 5);
switch (op)
{case 1:
clrscr();
energia();
break;
case 2:
clrscr();
sleep(3);
break;
case 3:
clrscr();
sleep(3);
break;
case 4:
clrscr();
sleep(3);
break;
case 5:
clrscr();
textcolor(LIGHTBLUE + 128);
gotoxy(25,12);
cprintf("Regresando al Menu Principal,...");
}
delay(2000);
textcolor(14);
} while (op != 5);
}
#include "stdio.h"
#include "conio.h"
#include "dos.h"
#include "\fuentes\momentos.c"

//...
int menu2()
{ int op, valor;
textbackground(3);
textcolor(14);
clrscr();
do {
do {
clrscr();
gotoxy(25,7); printf("MENU DE PROGRAMAS RAMIFICADOS");
gotoxy(17,10), printf(" 1. MOMENTOS");
gotoxy(17,12), printf(" 2. PROG2");
gotoxy(17,14), printf(" 3. PROG3");
gotoxy(17,16), printf(" 4. PROG4");
gotoxy(17,18), printf(" 5. Terminar");
gotoxy(17,20), printf(" Cual es tu opcion?: ");
scanf("%d",&op);
} while (op < 1 || op > 5);
switch (op)
{case 1:
clrscr();
momentos();
break;
case 2:
clrscr();
sleep(3);
break;
case 3:
clrscr();
sleep(3);
break;
case 4:
clrscr();
sleep(3);
break;
case 5:
clrscr();
textcolor(LIGHTBLUE + 128);
gotoxy(25,12);
cprintf("Regresando al Menu Principal,...");
}
delay(2000);
textcolor(14);
} while (op != 5);
}
#include "stdio.h"
#include "conio.h"
#include "dos.h"
#include "\fuentes\sumato.c"

//...
int menu3()
{ int op;
textbackground(3);
textcolor(14);
clrscr();
do {
do {
clrscr();
gotoxy(25,7); printf("MENU DE PROGRAMAS REPETITIVOS");
gotoxy(17,10), printf(" 1. SUMATORIA CON FOR");
gotoxy(17,12), printf(" 2. PROG2");
gotoxy(17,14), printf(" 3. PROG3");
gotoxy(17,16), printf(" 4. PROG4");
gotoxy(17,18), printf(" 5. Terminar");
gotoxy(17,20), printf(" Cual es tu opcion?: ");
scanf("%d",&op);
} while (op < 1 || op > 5);
switch (op)
{case 1:
clrscr();
sumato();
break;
case 2:
clrscr();
sleep(3);
break;
case 3:
clrscr();
sleep(3);
break;
case 4:
clrscr();
sleep(3);
break;
case 5:
clrscr();
textcolor(LIGHTBLUE + 128);
gotoxy(25,12);
cprintf("Regresando al Menu Principal,...");
}
delay(3000);
textcolor(14);
} while (op != 5);
}

También podría gustarte