1 2 3 4 5 6 7 8 9 10 11 1213 14 15 16 17 18 19 20 21 22 2324 25 26 27 28 29 30 31 32 33 3435 36 37 38 39 40 41 42 43 44 4546 47 48 49 50 51 52 53 54 55 |#include<cstdlib> #include<ctime> #include<iostream> using namespace std; int nofw; #define N 8 // numerode pares de palabras en la matriz bool checkrep(int n, int num[]) { for(int i=0; i<nofw; i++) if(n ==num[i]) return true; return false; } int main() { srand(time(NULL));string ans, words[N][2] = {{"hi", "hola"}, {"house", "casa"}, {"water", "agua"}, {"roof", "techo"}, {"chair", "silla"}, {"loudspeaker", "bocina"},{"screen", "pantalla"}, {"money", "dinero"}}; int n, correct=0, wrong=0; cout << "Numero de palabras?: "; cin >> nofw; //...
Leer documento completo
Regístrate para leer el documento completo.