Okay, I have taken an initial computer course and didn't take the follow up until now which has been over a year and a half. I have this code that I wrote but can't remember how to get it to add all the numbers....such as
5 = 1 + 2 + 3 + 4 + 5
Except it prints 1 + 2 + 3 + 4 + 5 +Code:#include <stdio.h> int main() { int num; int a,b; printf("Please input number for summation:"); scanf("%d", &num); for (a=1; a<=num; a++){ printf("%d+ ", a); } return 0; }