Solved

Counting Cows

Posted on 1997-08-12
7
222 Views
Last Modified: 2010-04-16
null
0
Comment
Question by:Satie
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
7 Comments
 
LVL 1

Expert Comment

by:barakp
ID: 1215407
What does the program do and what is your problem?
0
 

Author Comment

by:Satie
ID: 1215408
Edited text of question
0
 

Author Comment

by:Satie
ID: 1215409
Adjusted points to 60
0
[Webinar] Code, Load, and Grow

Managing multiple websites, servers, applications, and security on a daily basis? Join us for a webinar on May 25th to learn how to simplify administration and management of virtual hosts for IT admins, create a secure environment, and deploy code more effectively and frequently.

 

Author Comment

by:Satie
ID: 1215410
Edited text of question
0
 
LVL 2

Expert Comment

by:kellyjj
ID: 1215411
Are you looking for someone to do your homework??  Better increase your points.
0
 
LVL 1

Accepted Solution

by:
barakp earned 60 total points
ID: 1215412
Use 3 counters to count the number of cows of each color, use another variable to sum up a color total weight, then for the average divide that into the counter.
Validating isn't difficult if you get the ID into a string and use a function to check it.
Use a while loop which will stop once you enter a negative weight.
0
 
LVL 1

Expert Comment

by:barakp
ID: 1215413
Grade the answer!
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Unified and professional email signatures help maintain a consistent company brand image to the outside world. This article shows how to create an email signature in Exchange Server 2010 using a transport rule and how to overcome native limitations …
When the s#!t hits the fan, you don’t have time to look up who’s on call, draft emails, call collaborators, or send text messages. An instant chat window is definitely the way to go, especially one like HipChat. HipChat is a true business app. An…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
Suggested Courses

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question