Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
75 views2 pages

Assignment 1 PROG20799 - 2021

This 3 sentence summary provides the key details about the assignment: This assignment is worth 7.5% of the course mark and involves writing a C program to read in an array of user input numbers, check which numbers are prime and odd using defined functions, mark the minimum and maximum values in the array, calculate and display the sum and average of all elements, and output the results in a formatted way with comments in the code. Students must submit one Word/PDF document with code screenshots and outputs along with the .c files by June 04 at 5:00 PM, with late submissions penalized 10% per day for 3 days.

Uploaded by

Abhishek Anand
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
75 views2 pages

Assignment 1 PROG20799 - 2021

This 3 sentence summary provides the key details about the assignment: This assignment is worth 7.5% of the course mark and involves writing a C program to read in an array of user input numbers, check which numbers are prime and odd using defined functions, mark the minimum and maximum values in the array, calculate and display the sum and average of all elements, and output the results in a formatted way with comments in the code. Students must submit one Word/PDF document with code screenshots and outputs along with the .c files by June 04 at 5:00 PM, with late submissions penalized 10% per day for 3 days.

Uploaded by

Abhishek Anand
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

PROG20799 ‐ Data Structures & Algorithm Development – C

Assignment 1
7.5% of your course mark

Due Dates: June 04 @ 5:00 PM, Late submission is -10% per day for 3 days.

Instructions: This assignment is to be completed individually (This means by yourself, MUST


meet and comply with Sheridan’s rules on academic integrity).

Please submit the following on SLATE


- one (1) single document in Microsoft Word or PDF format. Incorporating
screenshots of the code and the output into the single document and pay attention
to your format.
- A soft copy (.c file) for each question so your instructor can test your answer (you
must submit the program regardless whether it is complete or incomplete, correct
or incorrect).

Please note:
o Submission multiple pdf or doc files (instead of one document) will not be marked.

Your teacher may ask you to explain your answers to ensure you had done your own work.
Question: (15 marks)
1. Write a program using C language to generate the above output after reading user input in
an array:
a. Display array values
b. Define and use isPrime function to check whether number is prime or not
c. Define and use isOdd function to check whether number is odd or not
d. Mark “Min” if number is Minimum within the array
e. Mark “Max” if number is Maximum within the array
f. Calculate and display the sum of all the elements of the array
g. Calculate and display the average of all the elements of the array

2. Use the printf function to suitably format and display the output
3. Write appropriate comments in the program

Notes:
• You are required to complete this assignment WITHOUT ANY OUTSIDE
COLLABORATION/HELP.

You might also like