Question: 1) Worth 2.75 points a) Create and call a function called numericalComputations(), without passing any parameters b) In the function, assign the value 100 to
1) Worth 2.75 points 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 2) Worth 2.00 points 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). 3) Worth 3.00 points 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 .. 4) Worth 2.00 points 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 ????".
If this could be done for ANCI S it would be greatly appreciated.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
