Question: plz give the all answer thank you...! Question 2 - 10 (Each question worth 2 points) 2. Write the header for a method named days.
Question 2 - 10 (Each question worth 2 points) 2. Write the header for a method named days. The method should return an int and have three int parameter variables: years, months, and weeks. 3. Write a method named getName that prompts the user to enter his or her first name, and then returns the user's input. 4. Write a for loop that displays every fifth number, zero through 100. 5. When writing data to a file, what is the difference between the print and the printin methods? 6. Write an expression that obtains a random integer between 34 and 55. Write an expression that obtains a random integer between 0 and 999. Write an expression that obtains a random number between 5.5 and 55.5. 7. Write a recursive mathematical definition for computing xin for a positive integer n and a real number x. 8. Write a for loop that repeats seven times, asking the user to enter a number. The loop should also calculate the sum of the numbers entered
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
