Name: _____________________________ XXXXXXXXXXDate of demonstration: ___________ Marks earned: /5 PROG1955 LAB 3 (Due by 8 AM on October 7) Maximum Points: 5, Weightage: 5% Pre-requisites: Readings...

.


Name: _____________________________ Date of demonstration: ___________ Marks earned: /5 PROG1955 LAB 3 (Due by 8 AM on October 7) Maximum Points: 5, Weightage: 5% Pre-requisites: Readings assigned thus far have been completed. Notes taken during lectures have been reviewed. To complete the lab, please follow the instructions below. Not following these instructions may result in deduction of marks. 1. To receive any credit, you need to: a. Demonstrate your work during the week 6 lab; b. Upload your work to eConestoga as instructed in step 2 by the deadline. 2. Save all work in one folder. Once you complete this lab, please compress the folder to create a file with “.zip” extension. Upload the “zip” file to the “Lab4” assignment folder on eConestoga. You will not receive any credit if you fail to upload this file, even if you have finished and demonstrated your work. No credit is awarded without demonstration. 3. Each C file you create must contain the following, within comments, at the top of the file: a. Your name; b. Date of program creation; c. Purpose/functionality of the program. 4. Any variables or functions you create must be named following “camelCase” notation. Variables must be initialized before use. In case of multiple variables, define only one variable per line. 5. Write a program that: a. Prompts the user for two positive integers. Your program finds all the prime numbers between the two integers (inclusive) and prints them on the console. Your program must use a C function with the following prototype int IsPrime(int number); This function returns 1, if number is prime, or 0 otherwise; b. Prompts the user for a non-negative integer between 0 and 7. Your program prints the factorial of the non-negative integer and prints it on the console. Your program must use a C function with the following prototype int Factorial(int number); This functions returns factorial of number, if number is between 0 and 7, otherwise, it returns a 0; c. Prompts the user for three integers. The program finds the largest integer and prints it on the console. Your program also prints whether the largest integer is odd or even. Your program must use two C functions with the following prototypes: i. int Largest(int num1, int num2, int num3); This function returns the largest of num1, num2, and num3; ii. int IsOdd(int number); This function returns 1, if number is odd, or 0 otherwise. Please be prepared to answer any questions during the demo. You are expected to correctly understand your programs. Any lack of understanding may result in deduction of points.
Oct 05, 2021
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here