Download presentation
Presentation is loading. Please wait.
Published byJessie Lewis Gibbs Modified over 9 years ago
1
Assignments
2
Assignment 1 Write a program to calculate the current equation Where p is the period of pendulum in seconds, g=980 cm/sec 2 (acceleration), L is the pendulum length in cm, is the angle of displacement in degrees.
3
Assignment 2 Suppose that the gas company bases its charges on consumption according to the following table:
4
Continue of assignment 2 Meter readings are four-digit numbers that represent cubic meters. Write a program in which the meter reading for the previous month and the current meter reading are entered and then the amount of the bill is calculated. The current reading may be less than the previous one; for example the previous reading may have been 9897, and the current one is 0103. Use IF statement.
5
Assignment 3 Write a program to read a set of numbers, and calculate the mean, variance, and standard deviation of the set of numbers. The mean and variance of numbers x 1, x 2, …, x n can be calculated using the following formulas: The standard deviation is the square root of the variance.
6
Assignment 4 Write a program to read a collection n of sets where each set has k positive numbers (k is not a user input and it should be counted), and calculate the mean, variance, and standard deviation for each set k of numbers. Display k, and calculated values on the screen. The mean and variance of numbers x 1, x 2, …, x k can be calculated using the following formulas: The standard deviation is the square root of the variance.
7
Assignment 5 Write a program that calculates the equation: Both denominator and numerator are calculated by two different functions for two inputs n and x. Read and display x in degrees. Write the values n, x, and F on the screen. Repeat the program as long as n is positive.
8
Assignment 6 Write a function that accepts an integer N and returns an array containing the first N square root of Repeat the program as long as N is positive.
9
Assignment 7 Write a program that reads the diameters and heights of several right circular cylinder and displays the circumference, total surface area (including the ends), and the volume of each. Circumference (C)= 2 r ; where r is the radius Total surface area = C (h+r); where h is the height Volume = r 2 h. Use only one subprogram to calculate above equations. Repeat the program as long as both diameter and height are positive.
10
Assignment 8 Write a program to read an array of numbers from the user, and use one subprogram to calculate the mean, variance, and standard deviation of the set of numbers. Use query control method to repeat the program. The mean and variance of numbers x 1, x 2, …, x n can be calculated using the following formulas: The standard deviation is the square root of the variance.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.