Skip to content

arcjun01/hello-world

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

The Scanner receives the user input. The different variables for appropriate data type is used to store input. The for loop contains the print statement to repeat the message. The helper method takes the message and number and handles printing - using the main to take and store input then call the method.

Here are the steps and instructions:

  1. Prompt the use to enter a message, read the input (using a Scanner) and store is as a String
  2. Prompt the user to enter a number and store the input as an int
  3. Write a for-loop which prints the message the given number of times, by using the given number in the loop condition
  4. Include a method called repeatMessage. The method should accept a String and an int as parameters, and contain the for-loop that will print the output (move the for loop into this method)
  5. Call the repeatMessage method from main passing both values (message and number) as parameters
  6. Experiment with different inputs to ensure your program functions as expected

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages