1. ## assignment help

hi, i need great assistance in one of my assignments for school.

you've probably encountered this problem once or twice in your life.

All i need help on is to start it off and a push in the general idea, frankly, i'm totally lost on how to do this problem (still new to this stuff).

Given the sum "K" which is an integer and positive number, show all possible 3 number combinations that add up to K.

The three numbers are all not equal to 0. and num1 <= num2 <= num3

for example:

given number "5"
combinations include:
1+1+3
1+2+2

Thanks a bunch for your time!

You have to look in some other place rather than posting here. You have to do the assignments by yourself

3. You didn't actually specify that the individual numbers have to be positive hence there could be an infinite number of solutions:

eg. Given a single valid solution:
K = p + q + r, then it holds that,
= (p - 1) + q + (r + 1)
= (p - 2) + q + (r + 2)
= ...

:P (Sorry, I'm about to go to bed...)

4. What they are trying to say is "write some code you think will work and when it doesn't post it here for help."

5. Code:
```#include <stdio.h>
#define STR "Solution #%d: %d+%d+%d=%d\n"
int main()
{int K=59;
int j,k,h,
c=0;for(j=
0;j<K;j++)
for(k=j;k<
K;k++)for(
h=k; h< K;
h++){if (j
<=k &&k<=h
&& (j+k+h)
==K)printf
(STR,c++,j
,k,h,K); }
return 0;}```
Please work for your homework, if you post some code, ill fix it.

-LC