The Artima Developer Community
Sponsored Link

Java Answers Forum
calculate average of numbers

1 reply on 1 page. Most recent reply: Oct 1, 2003 10:14 PM by Senthoorkumaran Punniamoorthy

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
Diann

Posts: 1
Nickname: dv
Registered: Oct, 2003

calculate average of numbers Posted: Oct 1, 2003 8:14 PM
Reply to this message Reply
Advertisement
I am trying to write a program that calculate odd and even numbers between 1 and 10 gives the average of each. I'm not sure how to program this in without specifing the numbers. (ie 1, 3, 5, 7, and 9)

Any ideas for me


Senthoorkumaran Punniamoorthy

Posts: 335
Nickname: senthoor
Registered: Mar, 2002

Re: calculate average of numbers Posted: Oct 1, 2003 10:14 PM
Reply to this message Reply
Do it inside a loop which runs from 1 to 10

Flat View: This topic has 1 reply on 1 page
Topic: Image Compare Previous Topic   Next Topic Topic: Browsing & Picture display

Sponsored Links



Google
  Web Artima.com   

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