Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In 1 7 8 4 , Carl Gauss solved problem # 1 in seconds by noticing that: 1 + 9 9 = 1 0 0

In 1784, Carl Gauss solved problem #1 in seconds by noticing that:
1+99=100,2+98=100,3+97=100...(he was 7 years old at the time.)
Write a for loop to compute the sum in #1 using approximately half the number of executions of the for loop in #1.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Visual Basic6 Database Programming

Authors: John W. Fronckowiak, David J. Helda

1st Edition

0764532545, 978-0764532542

More Books

Students also viewed these Databases questions

Question

sql query average grade of the selected pupil in selected subject!

Answered: 1 week ago

Question

4. What are the current trends in computer software platforms?

Answered: 1 week ago