[SOLVED] COM1002 Lab 3

30.00 $

Category: Tags: ,
Click Category Button to View Your Next Assignment | Homework

You will receive the following solution file(s) instantly after successful payment:

zip file icon Lab-3-v3oyve.zip (46.1 KB)
Assignment Instructions Updated Recently? Submit Below and we will provide new Solution!
Submit New Instructions
🔒 Securely Powered by:
Secure Checkout
Rate this product

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 ☺

  • Lab-3-v3oyve.zip