Writing program to calculate cir., area, etc. of circle. Radius is input as integer; how to convert integer to proceed with calculations?
Convert Integer?
Collapse
X
-
Tags: None
-
1. List your outputs and figure out what type of variable they should be.
2. Find the formulas for each of your outputs based on your input.
3. Program these formulas in.
Show code that you're using so far. Are you using a Scanner?Code:Scanner sc = new Scanner (System.in); int radius = sc.nextInt();
-
Actually, you led me in the right direction, but this is what I did and program ran;
System.out.prin t( "Enter radius: " ); // prompt
radius = input.nextInt() ; // read first entry from user
Thanks!Comment
Comment