I see that you've been through "the spanking machine." Yep, most of us only help after you've made a good-faith effort and show us your progress. It's the same principle your teacher uses when he/she doesn't give you the answers to the assigned homework. They expect you to struggle a bit with the new info. That's how most people learn.
Anyway, my advice would be to do the parts you CAN do. (I'm being vague on purpose, by the way...)
- Create a program that displays a msg to the user asking him/her to enter 5 integers.
- When that's working... update it to ask for Integer #1, then #2, then #3, etc.
- When that's working... save the user input to whatever variable type makes sense to you. To double-check your work, try printing the user's input after receiving all 5 values.
- When that works... figure out how to tell if a number is even, then update your program with a counter (of even numbers) and add the steps needed to determine if an integer is even.
- When that works... update it and tell the user how many even numbers he entered.
How much are you willing to pay someone to write that software for you? A good free-lance programmer can charge as much as $50.00 an hour or any fraction thereof, and a professional with years of experience can charge as much as $100.00 an hour or any fraction thereof.
And then, after paying all that money, you might get a good grade on the assignment, but then fail the course because you never learned anything, and you fail the exams! (Now THAT'S a brilliant plan if I ever heard one.)
Answers & Comments
here's a clue in C++
int inval, count=6, evens=0;
while(--count)
{cin>>inval;
inval%2?++evens
}
If you need to learn Java, I can help you with that. Tutoring Java is what I do.
The first hour is free, and you don't have to continue.
Why don't you contact me?
My Name: Kaydell
Email Address: [email protected]
Skype: live:kaydell
OK, I'll make it in ZX81 BASIC:
10 LET A=0
20 LET B=1
30 INPUT C
40 LET C=INT C
50 LET A=A+( (C/2) = INT ( C/2 ))
60 LET B=B+1
70 GO TO 30 + (50* (B>5))
80 PRINT A
90 STOP
I see that you've been through "the spanking machine." Yep, most of us only help after you've made a good-faith effort and show us your progress. It's the same principle your teacher uses when he/she doesn't give you the answers to the assigned homework. They expect you to struggle a bit with the new info. That's how most people learn.
Anyway, my advice would be to do the parts you CAN do. (I'm being vague on purpose, by the way...)
- Create a program that displays a msg to the user asking him/her to enter 5 integers.
- When that's working... update it to ask for Integer #1, then #2, then #3, etc.
- When that's working... save the user input to whatever variable type makes sense to you. To double-check your work, try printing the user's input after receiving all 5 values.
- When that works... figure out how to tell if a number is even, then update your program with a counter (of even numbers) and add the steps needed to determine if an integer is even.
- When that works... update it and tell the user how many even numbers he entered.
Easy, right?
that is three lines of code.
Show us what you have tried.
Don't be so lazy. This isn't difficult stuff. Try doing your own homework.
How much are you willing to pay someone to write that software for you? A good free-lance programmer can charge as much as $50.00 an hour or any fraction thereof, and a professional with years of experience can charge as much as $100.00 an hour or any fraction thereof.
And then, after paying all that money, you might get a good grade on the assignment, but then fail the course because you never learned anything, and you fail the exams! (Now THAT'S a brilliant plan if I ever heard one.)