Título: Hola necesito aydua con el siguiente código, la idea es que de bc lo pase a c++. Publicado por: SparkiestCloth en 12 Diciembre 2015, 18:37 pm #include<stdio.h>
#include<conio.h> define q1() { print "¿Cuál es la capital del estado de Yucatán?\n" print "\t1) Champotón\n" print "\t2) Valladolid\n" print "\t3) Campeche\n" print "\t4) Mérida\n" return 4 } define q2() { print "Sin contar el Distrito Federal,\n" print "¿cuántos estados tiene nuestro país?\n" print "\t1) 28\n" print "\t2) 31\n" print "\t3) 32\n" print "\t3) 35\n" return 2 } define q3() { print "¿Qué significa UNID?\n" print "\t1) Universidad Nacional Indigenista Diocesana\n" print "\t2) Universidad Independiente\n" print "\t3) Universidad Interamericana para el Desarrollo\n" print "\t4) Universidad de la Nicaragua Democrática\n" return 3 } define q4() { print "Año e inventor del lenguaje de programación C++\n" print "\t1) 1983, Bjarne Stroustrup\n" print "\t2) 1972, Dennis Ritchie\n" print "\t3) 1972, Bjarne Stroustrup\n" print "\t4) 1983, Dennis Ritchie\n" return 1 } print "Bienvenido al juego del conocimiento\n" questions = 4 hits = 0 for(i = 1; i <= questions; ++i) { print "\n" if(i == 1) { r = q1() } else if(i == 2) { r = q2() } else if(i == 3) { r = q3() } else if(i == 4) { r = q4() } else { print "Se me han gastado las preguntas...\n" break } print "Respuesta (1-", questions, "): " rr = read() while((rr < 0) || (rr > questions)) { print "Entre 1 y 4; otra vez: " rr = read() } if(rr == r) { print "Muy bien, ¡felicidades!\n" hits = hits + 1 } else { print "No... ¡era la ", r, "!\n" } } if(questions > 0) { scale = 2 note = 100 * hits / questions print "Calificación: ", note, " (", hits, "/", questions, ")\n" } quit Pero al compilarlo me aparece lo siguiente, Error E2141 2.txt 3: Declaration syntax error Error E2141 2.txt 43: Declaration syntax error Error E2040 2.txt 43: Declaration terminated incorrectly *** 3 errors in Compile *** Estoy empezando y realmente se que soy un tanto malo, solo quiero ayuda y se los agradecería mucho :-( |