Here's an update of the situation, and some code I've written.
Code:
#include <iostream>
using namespace std;
int biggerThan(int, int);
int smallerThan (int, int);
int equal (int, int);
int main()
{
cout << "Type in name of value one: ";
string one;
cin >> one;
cout << endl << "Type in name of value two: ";
string two;
cin >> two;
cout << endl << "Type in the value of " << one << ": ";
int onevalue;
cin >> onevalue;
cout << endl << "Type in the value of " << two << ": ";
int twovalue;
cin >> twovalue;
cout << endl << endl;
biggerThan(onevalue, twovalue);
smallerThan(onevalue, twovalue);
equal(onevalue, twovalue);
return 0;
}
int biggerThan(x,y)
{
while(x>y)
{
cout << one << " is bigger than " << two << " with ";
cout << x-y << ".";
x=y;
}
}
int smallerThan(x,y)
{
while(x<y)
{
cout << two " is bigger than " << one << " with ";
cout << y-x << ".";
x=y;
}
}
int equal(x, y)
{
while(x==y)
{
cout << one << " & " << two;
cout << " are equal ";
x=y+1;
}
}
I get a lot of messages from the compiler though. Can anyone tell me, or give me a hint as to what is wrong?
Here are some examples of the messages I get:
Code:
29 int biggerThan' redeclared as different kind of symbol
4 previous declaration of `int biggerThan(int, int)'
29 'int biggerThan'
4 conflicts with previous declaration `int biggerThan(int, int)'
29 `x' was not declared in this scope
29 `y' was not declared in this scope
30 initializer expression list treated as compound expression
30 expected `,' or `;' before '{' token
39 `int smallerThan' redeclared as different kind of symbol
5 previous declaration of `int smallerThan(int, int)'
and it goes on...
I guess most of you experienced people already can see instantly what the problem is, but if you want I can post all the remaining compiler outputs.
Thanks for any help
/Rahiiyja