It should look like this:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
|
#include<iostream>
using std::cout;
void s1 ( );
void s2 ( );
int main()
{
s1 ( );
s1 ( );
s2 ( );
s2 ( );
return 0;
}
void s1 ( )
{
cout << "Three blind mice\n";
}
void s2 ( )
{
cout << "See how they run\n";
}
|
using namespace std; is discouraged due to various reasons. You also typed it twice.
You are only using cout from the std namespace, so you only need to do using std::cout;
You don't need to put void in your functions, it's void by default.
Since your functions are void, they should not be returning anything, yet you are attempting to return "cout<<"See how they run"<<endl;"
A note on endl: '\n' does essentially the same thing and is faster. Your code is small enough right now that you won't notice a difference, but you will with larger programs.
You cannot cout a void function as you are attempting to do in main.
Edit:
You should also use more descriptive names for your functions. I have no clue as to what s1 does unless I read the full function.