elhacker.net cabecera Bienvenido(a), Visitante. Por favor Ingresar o Registrarse
¿Perdiste tu email de activación?.

 

 


Tema destacado: Security Series.XSS. [Cross Site Scripting]


  Mostrar Temas
Páginas: [1]
1  Programación / Programación C/C++ / Me pueden ayudar con este problema en: 5 Mayo 2018, 23:13 pm
main.cpp: In function 'int main()':
main.cpp:68:8: error: expected '(' before ';' token
 } while;
        ^
main.cpp:68:8: error: expected primary-expression before ';' token
main.cpp:68:8: error: expected ')' before ';' token
main.cpp: At global scope:
main.cpp:70:1: error: expected declaration before '}' token


este es el codigo completo
Código:
#include <iostream>

/* run this program using the console pauser or add your own getch, system("pause") or input loop */
using namespace std;

int main(int argc, char** argv) {

int industrial,plasticos,biomedica,ambiental,electronica,mecanica,mecatronica,sistemas;
int c1,c2,c3,c4,c5,c6,c7;
int i;
c1=10;
c2=20;
c3=12;
c4=15;
c5=20;
c6=13;
c7=12;

do{
cout <<"A que carrera quiere matricularse" << endl;
cout <<"1. Ing. Industrial  (10Cupos)" << endl;
cout <<"2. Ing. Plasticos   (20Cupos)" << endl;
cout <<"3. Ing. Biomedica   (12Cupos)" << endl;
cout <<"4. Ing. Electronica (15Cupos)" << endl;
cout <<"5. Ing. Mecanica    (20Cupos)" << endl;
cout <<"6. Ing. Mecatronica (13Cupos)" << endl;
cout <<"7. Ing. Sistemas (12Cupos)" << endl;
cin >> i;
switch (i){
case 1:

cout <<"Usted ha escogido Ing. Industrial" <<endl;
cout <<"Semestre a pagar 2'600.000" <<endl;
c1=c1-1;
case 2:
cout <<"Usted ha escogido Ing. Plasticos" <<endl;
cout <<"Semestre a pagar 2'800.000" <<endl;
c2=c2-1;
case 3:
cout <<"Usted ha escogido Ing. Biomedica" <<endl;
cout <<"Semestre a pagar 2'200.000" <<endl;
case 4:
cout <<"Usted ha escogido Ing. Electronica" <<endl;
cout <<"Semestre a pagar 2'600.000" <<endl;
c3=c3-1;
case 5:
cout <<"Usted ha escogido Ing. Mecanica" <<endl;
cout <<"Semestre a pagar 2'600.000" <<endl;
c4=c4-1;
case 6:
cout <<"Usted ha escogido Ing. Mecatronica" <<endl;
cout <<"Semestre a pagar 2'800.000" <<endl;
c5=c5-1;
case 7:
cout <<"Usted ha escogido Ing. Sistemas" <<endl;
cout <<"Semestre a pagar 2'600.000" <<endl;
c6=c6-1;
default:
cout << "No escogio ninguna carrera" << endl;
}

} while;

return 0;
}
Páginas: [1]
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines