#include<iostream>
int main()
{
int sum = 0;
// sum values form 1 up to 10 inclusive
for (int val = 1; val <=10; ++val)w
sum += val ; // equipment to sum = sum + val
std::cout <<"Sum of 1 to 10 inclusive is"
<<sum << std::endl;
return 0;
}
【无标题】
最新推荐文章于 2024-09-07 23:15:53 发布