Programming By Doing Lesson 11 - My Code
I am finding the programming by doing to be great practice. It does not use the IDE so it forces you to work a bit harder but the command prompt is great at returning errors that point to what the issue is.
On this lesson the desired output is:
This is room # 113
e is close to 2.71828
I am learning a bit about Computer Science
My working code:
public class UsingVariables
{
 public static void main (String[] args )
 {
  int roomNumber;
  double nearby;
  String classRoom;
  roomNumber = 113;
  nearby = 2.71828;
  classRoom = "Computer Science";
  System.out.println("This is room # " + roomNumber);
  System.out.println("e is close to " + nearby);
  System.out.println("I am learning a bit about " + classRoom);
  }
}
 
No comments:
Post a Comment