I just begin to learn C++, for the main method i do:
#include <iostream>
using namespace std;
int main ()
{
   int d;
   int n;
   cout <<"Enter the denominator: " << endl;
   cin >> d;
   cout <<"Enter the numerator: " << endl;
   cin >> n;
   cout <<"The result of operation is: " << endl;
   cout << (double)n/d << endl;
   cout <<"Done";
   return 0;
}
It doesn't produce output, but if I delete return 0. I will generate correct output. Shouldn't the main method in C++ always return an integer eventually?
 
     
     
    