Menus En c++

Páginas: 2 (419 palabras) Publicado: 13 de agosto de 2011
UNIVERSIDAD CENTRAL DEL ECUADOR
TRABAJO DE PROGRAMACION

#include<stdio.h>
#include<conio.h>
main()
{
char nm;
int op=1,n1,n2,n3,s=0,ne,i,j,c,f,es;
float ap,sn,p;while(op!=3)
{
clrscr();
gotoxy(25,5);printf("MENU\n");
gotoxy(10,7);printf("1. ROL DE PAGOS\n");
gotoxy(10,9);printf("2. PROMEDIO\n");
gotoxy(10,11);printf("3. SALIR\n");
gotoxy(10,13);printf("Ingreseuna opcion..:");scanf("%d",&op);

switch(op)
{
case 1:
clrscr();
gotoxy(25,5);printf("ROL DE PAGOS");
gotoxy(10,7);printf("Ingrese el numero de trabajadores..:");scanf("%d",&ne);gotoxy(10,9);printf("NOMBRE\n");
gotoxy(20,9);printf("SUELDO\n");
gotoxy(30,9);printf("APORTE IESS\n");
gotoxy(45,9);printf("SUELDO NETO\n");
for(i=1;i<=ne;i++)
{gotoxy(10,9+i);scanf("%s",&nm);
gotoxy(20,9+i);scanf("%d",&s);
ap=s*0.0039;
sn=s-ap;
gotoxy(30,9+i);printf("%f",ap);
gotoxy(45,9+i);printf("%f",sn);
while(s<265||s>5500)
{
gotoxy(45,20);printf("Errorde sueldo");
gotoxy(20,9+i);printf(" ");
gotoxy(30,9+i);printf(" ");
gotoxy(45,9+i);printf(" ");
gotoxy(20,9+i);scanf("%d",&s);
gotoxy(45,20);printf("");
ap=s*0.0039;
sn=s-ap;
gotoxy(30,9+i);printf("%f",ap);
gotoxy(45,9+i);printf("%f",sn);
}
}
getch();
break;

case 2:
clrscr();
gotoxy(25,5);printf("PROMEDIO");gotoxy(10,7);printf("Ingrese el numero de estudiantes..:");scanf("%d",&es);
gotoxy(10,9);printf("NOTA1");
gotoxy(20,9);printf("NOTA2");
gotoxy(30,9);printf("NOTA3");
gotoxy(40,9);printf("SUMA");gotoxy(50,9);printf("PROMEDIO");
//gotoxy(10,11);scanf("%d",&n1);
for(j=1;j<=es;j++)
{
n1=0;
s=0;
c=10;
f=11;
for (i=1;i<=3;i++)
{
gotoxy(c,f+j);scanf("%d",&n1);while(n1<0||n1>20)
{
gotoxy(45,20);printf("Nota no valida");
gotoxy(c,f+j);printf(" ");
n1=0;
gotoxy(c,f+j);scanf("%d",&n1);
gotoxy(45,20);printf(" ");
}
s=s+n1;
p=s/3;
c=c+10;
}...
Leer documento completo

Regístrate para leer el documento completo.

Estos documentos también te pueden resultar útiles

  • Codigo de menus en c++
  • Programa c++ con menús
  • Menus y barras de herramientas en visual c#
  • Menus
  • Menus
  • menus
  • Menus
  • Menus

Conviértase en miembro formal de Buenas Tareas

INSCRÍBETE - ES GRATIS