Access over 20 million homework & study documents

C programming assignment

Content type
User Generated
School
JKUAT
Rating
Showing Page:
1/11

Sign up to view the full document!

lock_open Sign Up
Showing Page:
2/11

Sign up to view the full document!

lock_open Sign Up
Showing Page:
3/11

Sign up to view the full document!

lock_open Sign Up
Showing Page:
4/11

Sign up to view the full document!

lock_open Sign Up
End of Preview - Want to read all 11 pages?
Access Now
Unformatted Attachment Preview
C PROGRAMMING C Programming Basics Assignment 1. Read in 20 float numbers into an array. (this code is provided to you). 2. For each value in float array, convert as follows: • Numbers greater than of equal to 15 should be multiplied by Π squared;. Note that Π is in the file math.h as M_PI. • Numbers not greater than or equal to 15 should converted to their absolute value using the standard C function used for that purpose. 3. Declare an array of 20 integers. Assign each value to the floating point value of the same index (in the floating point array) rounded to the nearest integer. 4. Implement a function (in ics2305-assign1-support.c) to print out the values of the float and integer arrays, one per line, as shown in the example output. Each function should take two values, the array length and the array itself. The functions are defined float_display_array (this function should print out the float values to three decimal places, one per line), and integer_display_array (this should be print the integer values, one per line). The floating point number should print out 3 digits to the right of the decimal place. Call both functions in the main function using the above defined arrays as parameters. 5. Create two functions that take an array and prints out the number of even values. The first function float_evens should ignore the part of the number to the right of the decimal point to determine if it is even. The second function integer_evens should count the numb ...
Purchase document to see full attachment
User generated content is uploaded by users for the purposes of learning and should be used following Studypool's honor code & terms of service.

Anonymous
Great! Studypool always delivers quality work.

Studypool
4.7
Trustpilot
4.5
Sitejabber
4.4