Hi all,
First time poster from Ireland here.
Anything i know from programming is based off a very quick dip into codeacademy and the first lecture given thus far.
Below is my code for taking the radius of a circle from the user and then going ahead to give radius, area, circumference.
I keep getting a "couldn't find symbol" error when compiling, which i have hunted down to be an issue with my variables.
For the life of my i cannot figure out how to get the scanner element working.
Any and all advice is welcome,
CC.
import java.util.scanner;
class CalculateCircleUserInput
{
public static void main(String[] args)
{
Scanner radius = new Scanner(System.in);
System.out.println("Please input the circle's radius: ");
double radius = radius.nextdouble();
double pi = 3.1416;
double area = pi*radius*radius;
double circumference = pi*radius*2;
System.out.println("You have defined the circle's radius as: " + radius);
System.out.println("It's area is " + area);
System.out.println("It's circumference is " + circumference);
}
}