+ 1
REDUNDANT
can you help what is wrong https://code.sololearn.com/c95jIXd5oXkk/?ref=app
9 odpowiedzi
+ 12
Look over what I said about the Scanner again. A Scanner does NOT store inputs. All it does is return what the user inputs. You have to store that scanned value in another variable.
So why you're getting an error is because you're trying to multiply Scanners together. Try something like this:
Scanner scan = new Scanner(System.in);
int radius = scan.nextInt(); //scan gives back the number the user inputs, radius stores it
//The rest of your code now works fine :)
+ 12
You're welcome :D
+ 9
First, the last 3 lines are not inside main(). Move the } brace so they're all in main().
Next, you're not storing the radius in a variable. radius is actually just your scanner. Rename your Scanner (in, scan, scanner, etc.), then make an int called rad or radius to store your input in.
The pi symbol is not a legal symbol in Java. Switch it out with Math.PI or 3.14.
+ 7
Your main ends too early. There is stuff outside main.
+ 2
OHHHH thanks
+ 2
thanks Tamara it is now complete (the code)
+ 1
Tamara appreciate Ur help but what u said about the scanner is false but that doesn't matter the rest u said helps heaps.... sorry I couldn't reply sooner
+ 1
J.G thanks for Ur help too also sorry I couldn't reply sooner
+ 1
THANKS GUYS A BUNCH... but now I face a new error with the operands I don't know if it is I used the same variable twice or that I need to use a different operator