Hi, I just started my C++ class a couple weeks ago and I am stuck and having a really diffcult time understanding which commands to use in my programs. I don't even know where to look to get a list.
Anyways, basically what we have to make our program do is take an imput from the user asking "Enter radius of circle:" and with that radius calculate and output the area on the screen and reiterate what the user typed in.
Here is my source code:
#include <iostream>
#include <cmath>
using namespace std;
int main (int argc, char *argv[], char **env)
{
cout << "Enter radius of circle:";
double r = cin.get;
double a = ( r * M_PI ) * ( r * M_PI );
cout << "Area is:" << a << "for radius of:" << r << ;
return 0;
}
I am getting all sorts of errors and I think im on the right track I am just unsure of how exactly to type it out.
Any input would be greatly appreciated.