我强烈建议你的格式要改一改。#include"stdio.h"
void main(){ int s,k,sum; printf("Enter the two numbers:\n"); scanf("%d%d",&s,&k), sum=0; while(s<=k) { sum=sum+s; s++; } printf("sum=%d\n",sum);}你的错误太多了。吓人呀!
呵呵 大家出错都很正常阿 scanf("%d%d",&s,&k)结束应该是分号吧