In order to have cout and cin works you need to add following libraries and namespace.#include <iostream>#include <stdlib.h>using namespace std;