Traditional Culture Encyclopedia - Traditional festivals - And described by traditional technology.
And described by traditional technology.
1. 1+2+3+ sum ... 100, described by the traditional flow chart, is:
1. Enter S= 1, n= 1.
2.n=n+ 1,S=S+n
3. Judge whether n = 100, and if so, go to 4.
If not, then: Go to 2.
4. Output the results
2. Convert to C language source program
# include & ltstdio.h & gt
void main()
{
int sum = 0;
int I = 1;
While (I<= 100)
{
sum+= i++;
}
Printf ("Result: %d", sum);
}
- Related articles
- Lu Jinjuan's acting experience
- Analyzing the Cultural Implications of "The King of Chess
- Who are the famous fashion designers in China? 、
- How much do you charge for moving?
- Traditional Festival of Xinzhou Old Street in Hubei Province —— February Flower Festival
- What are the contents of the "four deposits" of ancient buildings in China?
- Questions and answers about Peking Opera
- Can rural homestead be bought and sold freely?
- China printing and publishing industry 100 strong.
- Urgent Request! Question about Peking Opera Faces! Peking Opera faces of the four great masterpieces!