Search:

Type: Posts; User: mccoyca

Search: Search took 0.42 seconds.

  1. Re: Need to use mod operator to complete printSquare program

    The problem is still the same--I can't figure out how to make the numbers wrap around so that 4 numbers are printed out on 4 lines in every combination in ascending order. Right now my output is:
    ...
  2. Re: Need to use mod operator to complete printSquare program

    If you look at the first post in this thread, I have written the code that I have so far, and the output that is resulting from it. It is pretty close. Also, I assigned values to x and y, x = 3 (min)...
  3. Re: Need to use mod operator to complete printSquare program

    I tried to run it, but I don't think I am printing it correctly because it didn't result in any output.

    --- Update ---

    I really appreciate the questions, but I have not executed the program...
  4. Re: Need to use mod operator to complete printSquare program

    I tried to run it, but I don't think I am printing it correctly because it didn't result in any output.
  5. Re: Need to use mod operator to complete printSquare program

    They are supposed to wrap the range of numbers around so that after 6 it goes back to 3. I want to print from min to the current number, and that's what I was trying to do because I have already...
  6. Re: Need to use mod operator to complete printSquare program

    Is this code on the right track to completing the program:

    for( i = y; i >= x; i++);
    for( j = i; j >= y; j++);
  7. Re: Need to use mod operator to complete printSquare program

    Is it a problem that I am using the ++ operator in my for loop? The other thought I had was that I could initialize an array to print 4 numbers on each line.
  8. Re: Need to use mod operator to complete printSquare program

    Yes that is the mod function I am asking about, and yes you are understanding the program correctly. My professor suggested that I use the mod operator, but does not require that I do so.
  9. Need to use mod operator to complete printSquare program

    I need to make a program that will accept max and min integers and print a square of lines of increasing numbers.

    printSquare(3,6) needs to print:

    3456
    4563
    5634
    6345

    Below is what I...
Results 1 to 9 of 9