Traditional Culture Encyclopedia - Traditional festivals - Sum of all even numbers up to 100, please draw a flowchart
Sum of all even numbers up to 100, please draw a flowchart
The flowchart is very simple, so I won't draw it. The program is also very simple. #include <iostream>
using namespace std;
#define N 100
int main()
{
long sum=0;
for (int i=0;i< ;=N;i+=2)
{
sum+=i;
}
cout<< "The sum of all even numbers between 0 and "<<<N<< "is :"<<sum<<endl;
return 0;< /p>
}
- Previous article:Door screen geomantic omen
- Next article:How much does it cost to rent a warehouse in China for a year?
- Related articles
- What is the best choice for villa tiles?
- Why take a bath with citronella and grapefruit leaves on New Year's Eve?
- Mineral resources management
- I want to promote the company in Tik Tok. What channels are there?
- What is the main topic of the first lesson in 2023
- The activity process of Montessori's picture book reading lesson plan "Tiger and Rabbit"
- Traditional residential area form
- Reflections on the sound and rapid development of my hometown (Yibin)
- How about Jiangsu Furun Storage Co., Ltd.?
- What are the dress patterns of the Qing Empresses? Help the gods.