The Artima Developer Community
Sponsored Link

C# Answers Forum
Project Help

1 reply on 1 page. Most recent reply: Dec 17, 2002 4:05 PM by Matt Gerrans

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 1 reply on 1 page
Jack Drayer

Posts: 1
Nickname: king
Registered: Dec, 2002

Project Help Posted: Dec 12, 2002 11:47 AM
Reply to this message Reply
Advertisement
Hi

This is a small part of a major Project i am doing. (I hope people know how to do pseudo code)

1.Write pseudo code, which will receive a list of numbers and output the following: Average of all even numbers, Average of all odd numbers. Use -1 for the sentinel.

2.Write pseudocode which will receive a list of names and salaries, and output the following: The largest salary, The name of the person with the highest salary. Use an empty space for the sentinel.

if anyone knows pseudo code could you please help me

Thanx


Matt Gerrans

Posts: 1153
Nickname: matt
Registered: Feb, 2002

Re: Project Help Posted: Dec 17, 2002 4:05 PM
Reply to this message Reply
We need better specifications: Are these numbers integer values? The odd/even and "-1" requirements imply this. Should the average also be integer? If so, should it be rounded or truncated? Or are they floating point? If so, is 2.1 odd or even?

Also, why do you need sentinels? The length of an array in C# (as in Java) is easy to determine, so unlike C or C++, you don't need to stick in a special value.

Flat View: This topic has 1 reply on 1 page
Topic: Seriell Communication in C# Previous Topic   Next Topic Topic: UNIX Commands in C/C++

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use