Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Write in C, thank you. 3. Write a program to find out how many of the numbers from 1 to 100 are greater than 31,
Write in C, thank you.
3. Write a program to find out how many of the numbers from 1 to 100 are greater than 31, and find the sum of the natural numbers that are greater than 31. a. The program should have a loop which steps a variable (probably named i) over the 100 numbers. b. Hint: Inside the loop, if i is greater than 31, add 1 to a second variable (probably named count) which keeps track of total number of integers that are greater than 31, and add i to a third variable which keeps track of the sum. At the end of the program, after the loop has finished, print out the count and sum. c. The expected output (The sum might be wrong): The are 69 numbers from 1 to 100 are greater than 31. The sum of these 79 number is 1234Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started