TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Prime b
NA
810
345.9k
Stuck again on methods
Jan 17 2012 7:02 PM
Create a method named Sum() that accepts any number of
integer parameters and displays their sum. Write a Main()
method that demonstrates the Sum() method works correctly
when passed one, three, or fi ve integers, or an array of ten
integers.
Um, this is what I have done................Nothing really
static void Main(string[] args)
{
}
static void Sum(out int[] numbers)
{
Console.WriteLine("Please enter as many numbers as you want to see the sum of those numbers: ");
numbers = Convert.ToInt32(Console.ReadLine());
for (int index = 0; index < numbers.Length; ++index)
{
}
}
Reply
Answers (
2
)
I need help with methods
Labels, Arrays and Freezing Values