// functionprototype.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include <iostream>
int DoMath(int first, int second, int third, int fourth)
{
return first + second * third / fourth;
}
int main()
{
usingnamespace std;
cout << "Enter Number: ";
int first;
cin >> first;
cout << "Add +: ";
int second;
cin >> second;
cout << "Multiply it by? *: .?" ;
int third;
cin >> third;
cout << "And Divide it by /: ";
int fourth;
cin >> fourth;
cout << "And then you get: " << endl;
cout << DoMath << endl;
return 0;
}
It works all good down to the last line.
It outputs:
Enter Number: 2
Add +: 5
Multiply it by? *: .?4
And Divide it by /: 2
And then you get:
00A4120D
Press any key to continue . . .
As you shurly allready guest the answer shude not be: 00A4120D.
So is there sombody that can please tell me what i did wrong?
And am sorry for my bad gramma.
I realy try but i know its not good, thanks for bering whit me.
Oki thanks Disch :D
It works! :p
I tryd almost that just like this instead
" cout << DoMath(first, second, third, fourth) << endl; "
So gues the spaces killed the cat :p.
thanks again...