I need a help with my lab assignment, I should submit it today, please if anyone can help me in this.
======
Write a C++ program that prompts the user to enter 20 integer numbers and then use an if-else statement to print the average of odd numbers. Please note you should use while loop counter to solve this problem.
WHILE you are waiting for someone else to do your homework for you I suggest you do your best to code it yourself. At least show an effort so we can guide you though the problem.
Just in case... since it's a policy around here NOT to provide full homework solutions... you may be waiting a loooong time... ;-).
BTW, don't fool yourself into thinking you can learn how to code by looking at someone else's work. You MUST write it yourself or you'll never REALLY know how to do it.
I am starting currently to learn C++ but I will need some time to do, it is not hard guys.
I should send this assignment today to my teacher, and the problem is I was absent in the past days on the class as I was have traffic accident.. the doctor give me this assignment and this is my first day on the class since one month!
Can you help me guys in this, as I am starting to learn the C++... Just I need to submit this assignment as he need it tonight... please.
Since morning I am trying to learn and I learn many things, but to be honest with you, I am very starter, I will need times to understand that... just help me guys in this.. thank you
@ Olysold: Hey don't get me wrong, I laughed. Then I laughed even harder when I saw abdulla's "I'm waiting..." response 8^D. But THEN... I felt bad and thought I would try to nudge him in the right direction since he's new here and all.
OK, abdulla. So you missed the past few days (or months?) and now you can't do the C++ assignment your doctor gave you??? Hmmmmm. 8^\
Look over the links posted above and try to get something coded. Here is some pseudo-code to guide you:
MAIN LOOP
prompt user for number
IF number % 2 == 1 #If modulus(2) of number is 1 then it's odd
--- totalCount += 1
--- oddCount += 1
--- oddSum += number
ELSE
--- totalCount += 1
IF totalCount = 20
--- break and output results to user # oddSum / oddCount equals odd average