User Profile

Collapse

Profile Sidebar

Collapse
Charles Sherman
Charles Sherman
Last Activity: Dec 15 '10, 06:31 PM
Joined: Dec 14 '10
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Charles Sherman
    started a topic How to print off answers from For loops
    in Java

    How to print off answers from For loops

    I am writing a program that I have to take the length of a rectangle (1-10) and multiply them by the width(1-10) I am using a for loop and this is what I have so far
    Code:
      public class area
      {
      public static void main(Strings args[])
      {
      int height;
      int width;
      int area;
      int i;
      int e;
      for (i=1; i>=11; i++);
      height = i;
      for (e=1; e>=11; e++);
    ...
    See more | Go to post

  • Charles Sherman
    started a topic Cannot resolve Symbol
    in Java

    Cannot resolve Symbol

    Code:
      public class area
      {
      public static void main(Strings [] args)
      {
      int height;
      int width;
      int area;
      int i;
      int e;
      for (i=1; i>=11; i++);
      height = i;
      for (e=1; e>=11; e++);
      width = e;
      (area) = (height) * (width);
      System.out.print (area);}
    }
    It keeps telling me the error is in line 3....
    See more | Go to post

  • Charles Sherman
    replied to How to fix Unreachable Statements?
    in Java
    thank you for the help
    See more | Go to post

    Leave a comment:


  • Charles Sherman
    started a topic How to fix Unreachable Statements?
    in Java

    How to fix Unreachable Statements?

    Code:
    import java.util.Random;
    import TerminalIO.KeyboardReader;
     public class random
     {
      public static void main(String args[])
      {
      int guess;
      int answer;
      Random generator = new Random();
      KeyboardReader reader = new KeyboardReader(); 
      System.out.print("Enter Guess");
      guess = reader.readInt();
      answer = generator.nextInt(99+1);
      while(guess!=answer){
    ...
    See more | Go to post
No activity results to display
Show More
Working...