Answered step by step
Verified Expert Solution
Question
1 Approved Answer
a) Create and call a function called numericalComputations(), without passing any parameters b) In the function, assign the value 100 to the int maximunNumber c)
a) Create and call a function called numericalComputations(), without passing any parameters b) In the function, assign the value 100 to the int maximunNumber c) Display EACH result for EACH of the following computations: maximunNumber % 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 using printf and maximunNumber - 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 using printf and \t maximunNumber + 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 using printf and maximunNumber * 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 using printf and \t maximunNumber / 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 using printf and This means: compute maximunNumber with 1, then maximunNumber with 2, maximunNumber with 3 ... This function will have a total of 50 printf statements a) Create and call a function called sumOfNumbers(), without passing any parameters b) In the function, assign the value 100 to the int N. c) Using the sum of numbers formula: (1 + N)*(N/2) print the total amount of the sum of digits from 1 to 100 To find the sum of all the numbers from 1 to 100 (1 + 2 + 3 + 4 + . . + 100), the formula (1 + N)*(N/2) will do it. That is: (1 plus N quantity) times (N divided by 2). a) Create variables in the main() function and assign the corresponding values for: b) Your name c) Your mayor d) Amount of credits taken e) Amount of credits taking this semester f) This class's name g) Create and call a function named myInfo(..........), passing the above parameters h) In the function print: Hi my name is .. My major is .. I have completed .. credits. I and taking .. credits. This class's name is .. a) Do the same problem as problem 1 using a for loop. b) Do the same problem as problem 1 using a while loop. c) Find and print the sum of all numbers from 1 to 100 using a for loop, displaying "The sum of all numbers from 1 to 100 is ????".
.
I would greatly appreciate if this was done in ANCI C, not C++ or other language, in order to compile it correctly.
Step 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