Write a program that asks the user to enter two whole numbers, and prints the sum, product, difference, quotient and remainder of the two numbers.

Graded Homework 1
Part A:
Write a program that asks the user to enter two whole numbers,
and prints the sum, product, difference, quotient and remainder
of the two numbers.
Part B:
Write a program that gets three different whole numbers
from the user, then prints the sum, the average, the product of
these numbers.
Part C:
Write a program that reads in the radius of a circle
and prints the circle’s diameter, circumference and area. Use the
constant value 3.14159 for Pi. All calculations should occur outside
the printf statement(s) and use the formatted conversion %.2f for float variables.
Part D:
Write a program that calculates the student average based on
the following where the user enters 3 values, the program adds the values up and
then displays the student average.
GRADED HOMEWORK 2
Part A: if or if-else statements
Write a program that performs the following steps
1. User enters 2 integers
2. if the first is less than the second, print the statement in words
3. if the second is less than the first, print the statement in words
4. if the numbers are equal, print the statement in words
Part B: if or if-else statements
Write a program that performs the following steps
1. User enters 2 integers
2. if the first is evenly divisible by the second, print the statement in words
3. if the first is not evenly divisible, print the quotient and remainder
Part C: switch statement
Write a program that will perform the following steps
1. User enters an integer
2. Display the integer in English
if the user enters 7, the program prints seven
Part D: if-else
Write a program that will perform the following steps
1. User enter 5 integers
2. if the first number is negative, the program should calculate and print the product of the five numbers
3. if the first number is positive, the program should calculate and print the sum of the five numbers

GRADED HOMEWORK 3
Name:
Date: 3/2/2021 – 3/8/2021
Program Description:
Write a program using a menu to execute the following:
Menu
1 – Gas Mileage
2 – Sales Commission
3 – Grade Calculation
4 – Quit
Verify the menu choice is 1, 2, 3, or 4
The program should continue to loop until the user selects 4 to quit.
1 – Gas Mileage
Drivers are concerned with the mileage obtained by their automobiles.
One driver has kept track of several tanks of gasoline by recording
miles driven and gallons used for each tank. Develop a program using
a while loop that will input the miles driven and the gallons used for
each tank. The program should calculate and display the miles per
gallon obtained for each tank. After processing all input information,
the program should calculate and print the overall miles per gallon
obtained for all tanks.

2 – Sales Commission
People in sales frequently earn a base salary and commission on their sales.
A company has asked you to write a program to estimate the payroll for the
week given a person’s sales. The sales force earns a base salary of $300
per week plus 12% of their total sales for the week. Since each department
has a different number of employees, use a while loop to allow the user to
exit the program by entering an employee number less than 100 when they have
completed.
3 – Grade Calculation
Teachers are often required to give assessments and final grades. A teacher
friend has asked you to write a program to calculate the grades of their students.
Each student will have 5 grades that the teacher will enter into your program.
As the grades are entered, the program will verify that the grade is between
0 and 100, and add to the sum. Once the sum of the 5 grades has been completed,
the program will calculate and print the average of the grade. The program will
continue calculating student averages until the user decides to stop and print the
class average.

GRADED HOMEWORK 4
Write a program that contains all of the sample functions as well as the following functions. Your program can be arranged any way you want. The main() should include running each function.
Add these functions to your code
(you can copy and paste each function from this sheet to get comments)
1. Write 2 functions in C to find the square of the input number. (one for integers, one for decimals) and print the results within the function
Test Data :
Input any number for square : 20
Expected Output :
The square of 20 is : 400.00
2. Write a function in C to the sum of the input numbers and print the results within the function.
Test Data:
Input 2 integers: 14 20
Expected Output:
The sum of 14 and 20 is 34

3. Write a function to print the following menu
MENU
1. Addition
2. Subtraction
3. Multiplication
4. Division
5. Quit
4. Write a function to ask the user to enter a number between 1 and 5 and return it. The function should ask the user to enter a number, verify that it is between 1 and 5 and then return to a variable where it was called.

GRADED HOMEWORK 6
Write a program to calculate and print the following about circles when the user enters the radius
Diameter
Area
Circumference
Plan
Declare PI as a constant
Functions
Display “Circles” sign
Calculate the diameter – input: radius – return: diameter
Calculate area – input: radius – return: area
Calculate circumference – input: radius – return: circumference
Display results in a square
Input: radius, diameter, area, circumference
Return: none
Requirements
Functions
Circle Sign – make a large sign
A function that gets and returns the radius from the user – can not be 0 or a negative number
A function to calculate and return the diameter
A function to calculate and return the area
A function to calculate and return the circumference
A function to print the results inside of a square
Every function contains documentation
input – describe the parameters passed into the function
output – describe the value returned from the function call
purpose – what does the function do?
Code is free of warning and errors
GRADED HOMEWORK 7
Objective: Write a program to analyze the raw data from a survey using arrays and functions.

Basic Steps:
Initialize the data[100] array with random numbers from 1 to 9
Initialize the frequency[10] array with zeros
Use the frequency array to count the number of elements(1s, 2s, …)
Print the frequency table
Calculate and print the mean, median, and mode
Print the histogram

Basic Points
(10) Complete heading
Required Functions
(10) Initialize the data array and the frequency array
(15) Find the frequency of each element
(10) Display the frequency table
(15) Display histogram
(30) Calculate and display the following using the frequency table only
mean(10)
median(10)
mode(10)
(10) On time

Basic Output:
Frequency Table
1 10
2 15
3 12
4 16
5 11
6 9
7 11
8 13
9 3

Mean: 4.57 Median: 4 Mode: 4

Histogram
1: **********
2: ***************
3: ************
4: ****************
5: ***********
6: *********
7: ***********
8: *************
9: ***

Last Completed Projects

topic title academic level Writer delivered