#include <stdio.h>

int main() {
    int sum = 0, num = 1, n;
    scanf("%d", &n);
   while (num <= n){
       sum += num;
       num++;
       
   } 
    printf("%d", sum);
    return 0;
}

Embed on website

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