提交时间:2019-09-22 10:49:51

运行 ID: 794

#include<iostream> int main(){ int i=1,sum=0,n; scanf("%d",&n); while(i<=n){ sum=sum+i; i=i+2; } printf("%d",sum); return 0; }