Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

LAB Sheet - Arrays Objective(s): To be familiar with different C statements and concepts, especially Arrays. To be familiar with syntax and structure of C-programming

LAB Sheet - Arrays Objective(s): To be familiar with different C statements and concepts, especially Arrays. To be familiar with syntax and structure of C-programming To learn problem solving techniques using C Requirements: Answer the following questions in the provided lab solution report document and upload to Slate. Include both the code and output screenshots of your solutions in your submission. 1. Write a C program that reads n integers from the user (n is also read by user) and prints out their sum, average, and standard deviation. Use the following run examples for your run screenshots: Run example: n=12, array: {75,90,43,68,81,93,97,56,28,99,12,85} Run example: n=5, array: {23,54,11,64,39} 2. Enhance the program above by modularizing it, this is done by breaking down the code into the following functions: a. void readInts(int array[], int size); //A function to read size integers into the array b. int array Total(int array[], int size); // A function to calculate the sum of the integers stored in array float array Average(int array[], int size); //A function to calculate the mean of the integers stored in array d. float arrayStdDev (int array[], int size); //A function to calculate the standard deviation of the integers stored in array c. 3. Write a program that reads a positive integer n from the user and calculates, stores in array and prints out the first n terms of the Fibonacci series. Run example: if user input n is 8, the program stores then prints out the following array: 0, 1, 1, 2, 3, 5, 8, 13 Please do not forget to include screenshots of your solution along with your codes. The screenshots should be taken in full screen with your C program in the background and the run/output in the foreground.

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

Introduction to Wireless and Mobile Systems

Authors: Dharma P. Agrawal, Qing An Zeng

4th edition

1305087135, 978-1305087132, 9781305259621, 1305259629, 9781305537910 , 978-130508713

More Books

Students also viewed these Programming questions