COM1002-COMPUTER PROGRAMMING 2 (Solution)

$ 29.99
Category:

Description

LAB3 Quiz
Assoc. Prof. Dr. Hacer Yalım Keleş

DuraRon: 45 minutes

Write a C program which reads a set of numbers, un7l the EOF, from stdin and prints the number of items read from stdin and computes the mean of the sum of the squares of these numbers, excluding the numbers that are divided by 3 or 5, evenly. The computed mean is printed to stdout in 2 point precision. For example:
for the following input: Sample Input: 2 4 15 8 9 11
your program first prints 6, since there are 6 items read from the stdin and must calculate and print the sum of the squares, excluding 15 and 9, as follows:
2*2+4*4+8*8+11*11 =205
Then, the mean is computed as: 205/4 = 51.25
Output: 6 51.25 I/O format:
input: <set of integers> output: <# of items read>[Space]<mean computed as specified>
SuggesRon:
Prepare sample input files to test your program. Please test your program thoroughly before submission. Good luck ☺

Reviews

There are no reviews yet.

Be the first to review “COM1002-COMPUTER PROGRAMMING 2 (Solution)”

Your email address will not be published. Required fields are marked *