Given an int variable count that has already been declared , write a for loop that prints the integers 50 through 1, separated by spaces. Use no variables other than count.

LANGUAGE: C++

CHALLENGE:

Given an int variable count that has already been declared , write a for loop that prints the integers 50 through 1, separated by spaces. Use no variables other than count.

SOLUTION:

The Bad News: The content you are trying to access is only available to members.

The Good News: You too can be a member, simply Click Here.

Already a member?

Posted in ,

5 Comments

  1. Malcolm A. Morgan on February 19, 2016 at 6:15 am

    THIS IS THE CODE FOR C:

    for (count=50; count>0; count–){

    printf(” %d”, count);

    }

  2. N Malla on June 29, 2016 at 2:43 pm

    for (count=50; count>0; count–){
    printf(“%d\n”,count);
    }

  3. William Rodgers on December 1, 2016 at 6:36 pm

    for (count=50; count>0; count–)
    {
    System.out.println(count);
    }

  4. J Cohenour on February 28, 2017 at 4:54 pm

    Java

    for (int count=50; count>0; count–) {
    System.out.print(count + ” ” );
    }

    • Peter M. on March 20, 2017 at 7:15 pm

      This is all correct except the count- should be count–

Leave a Comment

You must be logged in to post a comment.