Código C++:
Ver original
#include <stdio.h> #include <conio.h> #include <iostream> #include <time.h> #include <string> using namespace std; main (){ int acertada=0, errada=0; string userInput, respuestas[]={"24628213","413651","78897","1246","82465882","96423","42132589532","2466550","8456792","84652796","836980","64523579","46460","52163525","864579","53156800","46224657982","12225623300","2222246","222227848","5235586","9146378","1234560","987654","98456","85245635","85000","3456835770","34592347","8546789","3654250","2465780","951357536","65456321","9877896550","321123","25825800","9516540","7335791","42535","425000","954580400","46224466","245622530","245245","84698","963369","123475","965488","45678952","46246880","2465846","134879540","4624631","14600789","46791243","77216331","82128","2462","4223","127924","78825688","2223246","96488220","954863227","954863227","46128132","4224927","1145623","24357","1462490","24922","95487","6489","3654995","2499720","3400","194792","491246","4620","4997592","954220","246524","246524","7914632111","2222465","9513574","279524","2652740","2462466","795432","9613297","21625556","74613349","225648991","21322498","16792160","46131430","33881199440","5675320"}; char username[30]; cout<<"\n\n BIENVENIDO AL TEST DE DIGITACION \n\n"; cout<<"\n\n Para llevar su registro, por favor digite su nombre "; time_t inicio,fin; for(int i=0; i<100; i++){ cout<<" " <<respuestas[i] << " : "; cin>>userInput; respuestas[i].compare(userInput)==0 ? acertada++ : errada++; } cout<<"\n CALIFICACION DEL SEÑOR (A) " <<username; cout<<"\n\n Respuestas acertadas: "<<acertada; cout<<"\n\n Respuestas erradas: "<< errada; }
Pueden ayudarme