#include <stdio.h> void Sum(int b_num,int e_num) { printf("Sum:%d\n",((e_num-b_num)+1)*(e_num + b_num)/2); } int main(void) { Sum(1,10); system("pause"); return 0; }