I have a question like this. Write a program that reads integer from keyboard. If I enter a negative number it return a negative number. If all the numbers I enter are positive numbers then return the average of these positive numbers.

Can someone help me out this problem?
Thank you.

Recommended Answers

All 2 Replies

Here's the way it works: you show us your code, tell us where you are having problems, then we try and help you solve those problems.

We don't do your homework for you.

Simples.

Member Avatar for safaklx

I definitely agree with you happygeek.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.