simple programme to find the largest of three
Hi
I was trying to write a simple program to find the largest out of the three given numbers. But when I try to compile it gives first error at the bold line. Could you please correct it?
By the way, is there any way that I could check it for all the errors before I try to compile it? e.g. When I tried to compile the program the compiler (Dev-C++) highlighted only the bold line, so I don't know (I'm sure there are!) if there are errors in other lines too. If I had known this I would have also boldfaced those lines too. Do you get what I'm trying to ask?
Please help me. Thanks a lot.
Code:
#include <iostream>
#include <conio>
using namespace std;
int main()
{
float a, b, c;
cout << "Enter the three numbers" << endl;
cout << "Enter a = " << endl;
cin >> a;
cout << "Enter b = ";
cin >> b;
cout << "Enter c= " << endl;
cin >> c;
if (a > b)&&(c < b)
cout << "a is the largest" << endl;
if (b > a)&&( a < c)
cout << "b is the largest" << endl;
else
cout << "c is the largest" << endl;
getch();
}