473,473 Members | 2,158 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Can someone PLEASE HELP with these methods!!!

22 New Member
***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).
Nov 2 '06 #1
1 1151
r035198x
13,262 MVP
***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.
Nov 3 '06 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: PHP2 | last post by:
can someone help me instal CGI C++ library on Linux http://www.vbmcgi.org/
5
by: shang | last post by:
Hi! I am trying to find a function that converts a string into a double or a long double number. I found atod() but I don't know which library I have to include to use it. Could someone help me? ...
1
by: Eric Borden | last post by:
I have created the following classes (psuedo code example): BaseClass protected method BaseClass.Foo(object Test) { Test = new object(); } MyClass : BaseClass private object myProperty;...
3
by: Marek | last post by:
Hello gurus! I wrote a code in VBS, that will check, that current user is in one from three groups. But i don't know how asimilate it with asp.net. This page will be a bridge between 2 - main...
0
by: Alan Silver | last post by:
Hello, I am having a problem setting and resetting cookies. I'm sure I just doing something really stupid as this is such a basic issue, but I can find any answer. Please can someone help me? ...
2
by: shblack | last post by:
Please can someone help me with this program. I am in a JAVA programming class and I am having a heck of a time. I am still having a problem with the basic concepts of JAVA but the teacher continues...
3
by: james121285 | last post by:
I have written a program that will take the max and min of 10 set values. I have to now change my program to allow for these inputs to be entered in by another document, and print the values into...
1
by: onequestion | last post by:
Hi friends.. Is it possible to find subdomains on a domain. Can someone help me? currently i'm using this code.. private static String GetSubDomain(URL url) ...
30
by: Anarki | last post by:
The following is the program i am trying to compile //restrict.c #include <stdio.h> int main() { char arr = "Qualifiers" char * restrict p = arr; int i = 0; for(; i < 10; ++i)
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.