r/javahelp • u/[deleted] • Feb 25 '14
Need Help with my Java Project!
Can someone help me create a program that can prompt the user to input numbers until two even numbers and two odd numbers have been entered, and add the first two odd numbers and multiply the first two even numbers? Thanks
Sample output#1:
Enter number: 1
Enter number: 4
Enter number: 7
Enter number: 2
Sum of odd: 8
Product of even: 8
Sample output#2:
Enter number: 5
Enter number: 1
Enter number: 8
Enter number: 7
Enter number: 3
Enter number: 10
Sum of odd: 6
Product of even: 80
EDIT: I actually finished it before reading any of the comments.
0
Upvotes
1
u/[deleted] Feb 25 '14
What have you come up with to test if the user inputted number is even or odd? Or do you mean you will simply tell the user to enter and odd or even number? If it's the second case, this program is as simple as it gets, presuming you are simply outputting the result to the console.