#include <stdio.h> main{ int sum = 0,i = 1,k; scanf("%d", &k); while (i <= k){ sum += i; i++: } printf("%d\n", sum): return 0;}
100
prog.c:4:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘{’ token { ^
Standard output is empty
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!