Confused
Ï written the following program in Borland C++ and keep getting the following error message "Namespace name expected" when I try to compile it.
But I still can't figure out what's wrong
Just for the heck of it I tried to compile another file I already succefully compiled in another program and that went smoothly still the same error message. Should I just stick to the other program or have I missed something?
Small wordlist
Skriv ett tal = write a number
Skriv ett annat tal = write another number
tal = number
ar storst = Is the greatest
I would appreciate any help with this.
#include iostream
using namespace std;
void main()
{
int tal1;
int tal2;
int tal3;
cout << "Skriv ett tal: ";
cin >> tal1;
cout << "Skriv ett tal till: ";
cin >> tal2;
cout << "Skriv ett tal till: ";
cin >> tal3;
if (tal1 > tal2, tal3)
cout << tal1 << " ar storst";
else if (tal2 > tal1, tal3)
cout << tal2 << " ar storst";
else if (tal3 > tal1, tal2)
cout << tal3 << " ar storst";
}
PS I got the >< around iostream but if I write them here it won't show up not sure how to get around that.
But I still can't figure out what's wrong
Just for the heck of it I tried to compile another file I already succefully compiled in another program and that went smoothly still the same error message. Should I just stick to the other program or have I missed something?
Small wordlist
Skriv ett tal = write a number
Skriv ett annat tal = write another number
tal = number
ar storst = Is the greatest
I would appreciate any help with this.
#include iostream
using namespace std;
void main()
{
int tal1;
int tal2;
int tal3;
cout << "Skriv ett tal: ";
cin >> tal1;
cout << "Skriv ett tal till: ";
cin >> tal2;
cout << "Skriv ett tal till: ";
cin >> tal3;
if (tal1 > tal2, tal3)
cout << tal1 << " ar storst";
else if (tal2 > tal1, tal3)
cout << tal2 << " ar storst";
else if (tal3 > tal1, tal2)
cout << tal3 << " ar storst";
}
PS I got the >< around iostream but if I write them here it won't show up not sure how to get around that.
