true but i got a 100
Type: Posts; User: silverpen10
true but i got a 100
public class Unit6_1 // Peter Krasinski
{
public static void main( String [] args )
{
int i = 0;
int sumODD = 0, sumEVEN = 0;
while ( ++i <= 25 )
{
if (i % 2...
every time it loops it displays the sum of the next even or odd number. the final is the sum of all numbers. i want to display that number alone
public class Unit6_1 // Peter Krasinski
{
public static void main( String [] args )
{
int i = 0;
int sumODD = 0, sumEVEN = 0;
while ( ++i <= 25 )
{
if (i % 2...
i never used counters before can you explain
Nvm i got the numbers now how would you add all values of odd or even
i got the evens by i % 2 == 0. but i can't get the odd even with if else
public class Unit6_1 // Peter Krasinski
{
public static void main( String [] args )
{
int i = 1;
int odd;
int even;
while ( i <= 25 )
{
sample code?
this is the question i was given "Write a program that loops through a series of integers in the range 0 to 25, determines whether each integer is even or odd, and displays the sum of the even...