Can someone PLEASE HELP with these methods!!!

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ryann18
    New Member
    • Oct 2006
    • 22

    #1

    Can someone PLEASE HELP with these methods!!!

    ***Write a method called alarm that prints the string "Alarm!" multiple times on
    seperate lines. The method should accept an integer parameter that
    specifies how many times the string is printed. Print an error message if
    the parameter is less than 1.

    ***Write a method called sumRange that accepts two integers parameters that
    represent a range. Issue an error message and return zero if the second
    parameter is less than the first. Otherwise, the method should return the
    sum of integers in that range (inclusive).
  • r035198x
    MVP
    • Sep 2006
    • 13225

    #2
    Originally posted by ryann18
    ***Write a method called alarm that prints the string "Alarm!" multiple times on
    seperate lines. The method should accept an integer parameter that
    specifies how many times the string is printed. Print an error message if
    the parameter is less than 1.

    ***Write a method called sumRange that accepts two integers parameters that
    represent a range. Issue an error message and return zero if the second
    parameter is less than the first. Otherwise, the method should return the
    sum of integers in that range (inclusive).
    Now that you know how to take input into a program, why don't you try it out first and post what you have so others can know where you need help most.

    Comment

    Working...