Search:

Type: Posts; User: silverpen10

Search: Search took 0.07 seconds.

  1. Replies
    19
    Views
    2,340

    Re: problem with odd/even

    true but i got a 100
  2. Replies
    19
    Views
    2,340

    Re: problem with odd/even

    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...
  3. Replies
    19
    Views
    2,340

    Re: problem with odd/even

    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
  4. Replies
    19
    Views
    2,340

    Re: problem with odd/even

    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...
  5. Replies
    19
    Views
    2,340

    Re: problem with odd/even

    i never used counters before can you explain
  6. Replies
    19
    Views
    2,340

    Re: problem with odd/even

    Nvm i got the numbers now how would you add all values of odd or even
  7. Replies
    19
    Views
    2,340

    Re: problem with odd/even

    i got the evens by i % 2 == 0. but i can't get the odd even with if else
  8. Replies
    19
    Views
    2,340

    Re: problem with odd/even

    public class Unit6_1 // Peter Krasinski
    {
    public static void main( String [] args )
    {
    int i = 1;
    int odd;
    int even;
    while ( i <= 25 )
    {
  9. Replies
    19
    Views
    2,340

    Re: problem with odd/even

    sample code?
  10. Replies
    19
    Views
    2,340

    problem with odd/even

    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...
Results 1 to 10 of 10