There are a few problems with your code, Hirokachi.
1.
#include "iostream"
No,
iostream should not be wrapped in double-quotation signs "". We always write :
#include <iostream>
2.
std::cout << "Please type a number to find out if it's odd or even : \n";
Most likely, when you are about to input a certain something, it is more advisable that you consider removing the redundant newline character at the end.
std::cout << "Please type a number to find out if it's odd or even : ";
So you have a program with better output.
3.
1 2
|
std::cout << "the number is even.\n";
std::cout << "the number is odd.\n";
|
Maybe your code is sort of poor quality. You didn't start your sentences with a capital letter.
You can change it to :
1 2
|
std::cout << "The number is even.\n";
std::cout << "The number is odd.\n";
|
4.
It is good practice to write code without
using namespace std;
but for C++ beginners, repeatedly write
std::
many times can be considered confusing and time consuming for them. I strongly advise that you just use
using namespace std;
without much thoughts to help people, and choose not to use
using namespace std;
in your own code if you believe that your code may gain more benefits from it.