At the moment of executing the .exe of a program in c ++ it does not pause, that is to say it closes of blow and I do not understand because it happens since I have a "getch" and a (pause))
#include <conio.h>
#include <stdio.h>
#include <string.h>
int main()
{
// int ingles;
// char nivel[10];
// printf( "\n QUE NIVEL DE INGLES CREES QUE TIENES?: " );
// scanf( "%s","&nivel");
char r1[10];
char r2[10];
char r3[10];
char respuesta1[] = "eaten";
char respuesta2[] = "clever";
char respuesta3[] = "pretty";
int num_correctas = 0;
int num_incorrectas = 0;
printf( "\n Escribe la palabra que falta-i have never.... indian food-" );
gets(r1);
if (strcmp(respuesta1,r1) == 0 )
{
printf( "\n correcto");
num_correctas = num_correctas + 1;
}
else
{
printf( "\n incorrecto");
num_incorrectas = num_incorrectas + 1;
}
printf( "\n sinonimo de +intelligent+-" );
gets(r2);
if (strcmp(respuesta2,r2) == 0 )
{
printf( "\n correcto");
num_correctas = num_correctas + 1;
}
else
{
printf( "\n incorrecto");
num_incorrectas = num_incorrectas + 1;
}
printf( "\n sinonimo de +beautiful+- " );
gets(r3);
if (strcmp(respuesta3,r3) == 0 )
{
printf( "\n correcto");
num_correctas = num_correctas + 1;
}
else
{
printf( "\n incorrecto");
num_incorrectas = num_incorrectas + 1;
}
printf("\n Numero de respuestas correctas: %d", num_correctas);
printf("\n Numero de respuestas incorrectas: %d", num_incorrectas);
return 0;
("PAUSE()");
getch();
}