#include <stdio.h>
int main()
{
    int  j, sum = 0;

    printf("The first 10 natural number is :\n");
 
    for (j = 1; j <= 10; j++)
    {
        sum = sum + j;
        printf("%d ",j);    
    }
    printf("\nThe Sum is : %d\n", sum);
}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: