Sum from 1 to 100

- In mathematics, a
**geometric series**is the**sum**of an infinite number of terms that have a constant ratio between successive terms. For example, the series + + + + is geometric, because each successive term can be obtained by multiplying the previous term by /.In general, a**geometric series**is written as + + + +..., where is the coefficient of each term and is the common ratio - Answer (
**1**of 2): One way to answer this is simply to add all of the odd numbers from 51 to 99. But there is a way that is faster, easier, and more fun. It does require thinking about the numbers, and noticing patterns. Consider a**1**\times1 square. If you draw it, it has (of course)**1**square. No... - The sequence of numbers (
**1**, 2, 3, ,**100**) is arithmetic and when we are looking for the**sum**of a sequence, we call it a series. Thanks to Gauss, there is a special formula we can use to find the**sum**of a series: S is the**sum**of the series and n is the number of terms in the series, in this case,**100**. Hope this helps! - n = int(input("Enter number"))
**sum**= 0 # loop from**1****to**n for num in range(1, n +**1**,**1**):**sum**=**sum**+ num print("Sum of first ", n, "numbers is: ",**sum**) average =**sum**/ n print("Average of ", n, "numbers is: ", average) Run Output Enter number 10**Sum**of first 10 numbers is: 55 Average of 10 numbers is: 5.5 Use built-in function**sum**() - I hope after going through this post, you understand how to print prime numbers
**from 1 to 100**using the C Programming language. If you have any doubt regarding the program, then contact us in the comment section. We will be delighted to assist you. ... C Program To Check Whether a Number can be Expressed as**Sum**of Two Prime Numbers;