Monday, May 24, 2010

Question in C Programming?

Using C/C++ programming, I have to enter in 5 numbers, and the program should find out the largest entered number, check if its negative, if so, the program should ignore it and add up the rest, I want to display the total sum of all numbers entered. I have to do this using only loops. Please help me out, thanks

Question in C Programming?
I was about to solve it for you, but yes what rod says is correct, so i am not doing it, :), try hard a little, and post your code here, you will do great and since you are learning we can help you if its needed.


----------


Hi buddy, How is your solution going?, let us know...


---------


How did your solution go!, lol...let us know.
Reply:This is not hard, but if we just do it for you, you won't learn very well.





It involves loops, so can you write a program to input 5 numbers and put them into integers? If you haven't had arrays, yet, you could just declare the numbers as:





int n1, n2, n3, n4, n5;





Make a good stab at it, and post again, then people can help you get over any problems.


No comments:

Post a Comment