Hey guys just trying to write a simple program where I ask the user to in 2 number.
So if the user puts the 8 first and then let say 2
i print back the result 1 and 7,2 and 6,3 and 5,basically what ever adds up to 8
So I have my printf and scanf wrote and variable stored and I'm the best way to do get my ansewr is to pass my variable to a function
Something like int calculate(int total,int variations)
but this is where I'm getting bogged down,like i have my total which is equal to 8
but I dunno how to get my numbers equaling to it,maybe use an array or something or a bunch of if/else statements,I dunno