Hey everybody...this is a new programmer....I started programming less than a week ago...I need help creating a c program that adds numbers from 1 to a million. I have tried it using many tutorials, but I don't know how to make it add from 1 to a million because 1 million is too big and there is an error...some tutorial said that the max was 32767. I am using Turbo C++ 4.5 Compiler and here is my program so far...

#include <stdio.h>

int main()
{
int a, b;
a = 0;
b = 0;
while (a<1000001)
{
a++;
b = a + b;
printf("%d\n, a)
}
return 0;
}

I need help making the program so that it adds the numbers from 1 to a million and prints each number, and at the end it prints the sum.