469,600 Members | 2,393 Online

# Convert Integer?

Writing program to calculate cir., area, etc. of circle. Radius is input as integer; how to convert integer to proceed with calculations?
Apr 8 '10 #1
2 2209
jkmyoung
2,057 Expert 2GB
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?
Expand|Select|Wrap|Line Numbers
1.  Scanner sc = new Scanner (System.in);
2. int radius = sc.nextInt();
Apr 8 '10 #2
Actually, you led me in the right direction, but this is what I did and program ran;

System.out.print( "Enter radius: " ); // prompt
radius = input.nextInt(); // read first entry from user

Thanks!
Apr 9 '10 #3

### Post your reply

Sign in to post your reply or Sign up for a free account.

### Similar topics

 1 post views Thread by Logan X via .NET 247 | last post: by 3 posts views Thread by Convert TextBox.Text to Int32 Problem | last post: by 3 posts views Thread by Mike Miller | last post: by 4 posts views Thread by Andreas Klemt | last post: by 7 posts views Thread by Scott Schluer | last post: by 6 posts views Thread by MrKrich | last post: by 5 posts views Thread by Mika M | last post: by 20 posts views Thread by Niyazi | last post: by 5 posts views Thread by Bob Homes | last post: by 7 posts views Thread by shellon | last post: by reply views Thread by suresh191 | last post: by reply views Thread by goatbishop | last post: by reply views Thread by Trystan | last post: by reply views Thread by Marketing QM | last post: by reply views Thread by devgraph | last post: by reply views Thread by PitrL | last post: by 1 post views Thread by tbutler | last post: by reply views Thread by billypeterson | last post: by 4 posts views Thread by guiromero | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.