Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1 ) Worth 0 . 2 5 points. a ) Include the following header in every program: * * * * * * * *

1) Worth 0.25 points.
a) Include the following header in every program:
*********************************************************************
Author : Your Name
Course : COP 2270 Sec ANSI C Online
Professor : Michael Robinson
Program # : Program Purpose/Description
{A brief description of the program }
Due Date : MM/DD/YYYY
Certification:
I hereby certify that this work is my own and none of it is the work of any other person.
..........{ your signature }..........
*********************************************************************
2) Worth 2.75 points
a) Create and call a function called numericalComputations(),
without passing any parameters
b) In the function, assign the value 10 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
3) 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).
4) 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 ..
5) Worth 2.00 points
a) Do the same problem as question 2 using a for loop.
b) Do the same problem as question 2 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 ????".

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

Climate And Environmental Database Systems

Authors: Michael Lautenschlager ,Manfred Reinke

1st Edition

1461368332, 978-1461368335

More Books

Students also viewed these Databases questions

Question

Identify the cognitive roots of prejudice.

Answered: 1 week ago

Question

state what is meant by the term performance management

Answered: 1 week ago