#include <stdio.h> int main() { int n; printf("enter\n"); scanf ("%d", &n); int sum=0; for(int i=1; i<=n; i=i+1){ sum=sum+i; } printf("%d", sum); return 0; }
To embed this project on your website, copy the following code and paste it into your website's HTML: