Hey
I'm trying to write a console program that will work out th area or perimeter of a square, rectangle, triangle or circle. I'm having trouble with an if condition after a cin character is requested from the user. Here's the code:
CODE
#include <cstdlib>
#include <iostream>
#include <math.h>
using namespace std;
int main(int argc, char *argv[])
{char aorp;
cout << "Do you want to work out an area problem or a perimeter problem? If area, type a, if perimeter, type p." << endl;
cin >> aorp;
if (aorp) == (a)
this if condition returns an "expected primary-expression before '= =' token.
ANy help would be appreciated. Also, is there any way to let the user choose to terminate the program after working out one area or perimeter problem, or running the program another time?
Thanks in advance, folks.