Thread: I need help
View Single Post
  #17 (permalink)  
Old 01-25-2008, 12:21 PM
Eranga's Avatar
Eranga Eranga is offline
Moderator
 
Join Date: Jul 2007
Location: Colombo, Sri Lanka
Posts: 5,061
Eranga has a spectacular aura aboutEranga has a spectacular aura about
Send a message via Yahoo to Eranga
Quote:
Originally Posted by Clemenza1983 View Post
What i dun understand is
If every "AGE" is greater than zero
(Total_age = Total_Age + AGE) --> this is the part i do not understand.

Can pls explain how you get Total Age may be a silly question but i just do not understand this part.

Do you have msn messenger? I know it inappropriate for me to ask this.
Ok, first I initialized Total_Age to zero. Then you read the file, say line by line. At the reading time you can find the age of each student. I think it is clear.

Say first student age is 20, then
Total_Age = 0 + 20 --> Result is 20

Say second student age is 15, then
Total_Age = 20 + 15 --> Result is 35

I have put a condition, age greater than zero. Because no one can have zero age. Is it clear to you.

BTW, if you can use my Yahoo messenger. You can see it my profile.
__________________
Use an appropriate Subject. "Help, urgent!" isn't one.
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

Someone helped you?
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
their helpful post.
Help:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Resources:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Web:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Tips:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Reply With Quote