fork download
  1. /*
  2. * See math operations in java here:
  3. * Each of these operators can be called like I called Math.pow (ex: Math.abs(variable) )
  4. *
  5. * Problems that you should try to solve-- Pick one or more!
  6. * A: Allow the user to enter a telephone number, use an if statement to invalidate numbers that are too long / short in length
  7. * if the telephone number is within the right length, seperate the numbers appropriately into how they would appear in your
  8. * country of origin: Ex. 7818789000 would turn into 781-878-9000 in the USA. (This won't require much but mod / division)
  9. * Hint: Use long or double if you need to use a big number.
  10. *
  11. * B: Quadratic formula solver: The quadratic equation made each of us a little scared when we first saw it in algebra 1, write
  12. * a program that conquors the beast that is:
  13. *
  14. *
  15. *
  16. * C: Write a program that will allow you to input a number to select an operation (output a menu, then allow the user to select one).
  17. * In that menu you should be allowing the user to choose a shape (circle, square, rectangle, etc). Once they select it, ask them to
  18. * input the dimensions of it (circle can be radius, diameter, circumferece, rectangle can be length, width, perimeter or area.... etc etc.)
  19. * Once you have taken in a few points of input, calculate the missing pieces of information. Perhaps someone has a rectangle
  20. * where they have the area and the length, but not the width. Using java, figure out what the missing width is.
  21. *
  22. * D: Extra credit for people that are antsy to get some after the last 2 assignments (grades posted this weekend):
  23. * write a program that determines the last digit of 3^n power (3^3 = 27, thus 7). Hint, you can use n%4 to help you on this one.
  24. */
Not running #stdin #stdout 0s 0KB
Standard input is empty
Standard output is empty