Using printf and scanf in Eclipse and Netbeans - Language C

0

Good evening. I have the program below that asks the user to insert two numbers and then present them. In Code Blocks is working correctly, however when I run in Eclipse or Netbeans, the system waits for the numbers to be entered without the presentation of the messages in printf. Does anyone know how to solve it?

#include <stdio.h>
#include <stdlib.h>

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

int num1, num2;

printf ("Digite o primeiro numero: ");

scanf("%d", &num1);

printf ("Digite o segundo numero: ");

scanf("%d", &num2);

printf ("Os números diigitados foram %d e %d.", num1, num2);

return 0;

}

Console result:

5
5
Digite o primeiro numero: Digite o segundo numero: Os números digitados        
foram 5 e 5.
    
asked by anonymous 25.02.2018 / 02:04

0 answers