package com.codegym.task.task01.task0129;
/*
Calculate the circumference of a circle
*/
public class Solution {
public static void main(String[] args) {
printCircleCircumference(5);
double pi = 3.14;
double C = 2*pi*radius;
System.out.println(C);
}
public static void printCircleCircumference(int radius) {
//write your code here
}
}
Saying error on the first letter of radius why?????
Under discussion
Comments (7)
- Popular
- New
- Old
You must be signed in to leave a comment
Cz Ferencz
17 September 2021, 14:55
Write your code where they tell you to write your code.
0
cyddd
29 January 2020, 12:37
i meet the same problem , you solve it ?
0
Krishna shahi
3 November 2018, 11:05
May this will help you-
public class Solution {
public static void main(String[] args) {
printCircleCircumference(5);
}
public static void printCircleCircumference(int radius) {
double circumference = (Double) (2 * 3.14) * radius;
System.out.println(circumference);
}
}
+3
PALLAVI KASHYAP
30 October 2018, 09:42
package com.codegym.task.task01.task0129;
/*
Calculate the circumference of a circle
*/
public class Solution {
public static void main(String[] args) {
printCircleCircumference(5);
}
public static void printCircleCircumference(int radius) {
Double pi=3.14;
Double C;
C= 2*pi*radius;
System.out.println(+C);
}
}
0
ousi4ous
10 April 2019, 10:13
I don't think this code was validated
0
Monica Nicoleta
30 October 2018, 07:55
Also watch your syntax, where you need spaces between characters
0
Sumi Thomas
30 October 2018, 04:12
you need to write the calculations in the printCircleCircumference() method.
0