#include <stdio.h>int main() { int n; scanf("%d", &n); printf("Sum=%d", n*(n+1)/2); return 0;}
2
Sum=3
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!