SJSU/Udacity CS046

Problem Set 3

  1. Numbers
  2. Volume of a Cone
  3. Last Digit
  4. Average
  5. String Length
  6. Concatenation
  7. Strings
  8. If Statements
  9. First Character
  10. Last Character
  11. Yard Calculator
  12. Mileage Printer
  13. Balloon

Strings

Write the printf statement with a format specifier that will print the value of a floating point variable called gpa with one decimal place and a field width of 10. System.out.printf("%10.1f", gpa);
Define a String called book and assign to it the literal, My favorite book is, "Warrior's Apprentice" including the quotes. String book = " My favorite book is \"Warrior's Apprentice\"";

Problem on this page?

Your name:

Your email address:

Problem description:

To protect against spam robots, please answer this simple math problem:
× =