Hello. Sorry for bad english first of all, I'm not a native speaker. So I've got a task to program in C language and I just can't figure out how to solve it and do it properly --- I'm very new to programming so yeah... The task is: Make a program, that whenever you type some kind of number, it displays its squares total sum. For example if I type in the program let's say 4, it will be (1*1+2*2+3*3+4*4) and it will show me the answer of 30, or if I type 6 (1*1+2*2+3*3+4*4+5*5+6*6) it will be 91. I'm guessing this has something to do with while () function?

Thanks for taking your time