How to take out numbers out of interval ?

Hello, I have an interval of 'a=5' and 'b=8'. I need to print out all possible scalene triangles sides lenght. How can I take out number 'c' of that interval and use all 3 numbers to find scalene triangles ? For example:
1
2
3
  a=5, b=6, c=7
  a=6, b=7, c=8
  a=5, b=7, c=8

To find them, I guess I need to use a 'while' loop and maybe 'for' ? But not sure how to make all 3 numbers to keep changing. Numbers cant be equal to each other. Could I please get a hint on how to do this ? Thank you !
You need a triply nested for loop.

Like:
1
2
3
4
5
for (int a=5; a<=8; a++)
    for (int b=a+1; b<=8; b++)
        for (int c=b+1; c<=8; c++)
             {
             }
It worked ! Thank you very much :)
Topic archived. No new replies allowed.