ClubEnsayos.com - Ensayos de Calidad, Tareas y Monografias
Buscar

Estructura Switch En C++


Enviado por   •  19 de Octubre de 2014  •  290 Palabras (2 Páginas)  •  186 Visitas

Página 1 de 2

#include <iostream.h>

#include <conio.h>

main()

{

clrscr();

int opc;

do

{

clrscr();

cout<<" OPCIONES "<<endl<<endl;

cout<<" 1) Servicio de Internet"<<endl;

cout<<" 2) Impresiones"<<endl;

cout<<" 3) Fotocopiado"<<endl;

cout<<" 4) Lapices"<<endl;

cout<<" 5) Salir"<<endl<<endl<<endl<<endl;

cout<<"---> ";

cin>>opc;

switch(opc)

{

case 1:

clrscr();

getch();

break;

case 2:

clrscr();

getch();

break;

case 3:

clrscr();

getch();

break;

case 4:

clrscr();

getch();

break;

case 5:

clrscr();

cout<<"Presione enter para salir...";

break;

default:

cout<<"Opcion incorrecta!";

break;

}

}while(opc!=5);

getch();

}

...

Descargar como (para miembros actualizados)  txt (920 bytes)  
Leer 1 página más »
Disponible sólo en Clubensayos.com