{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Fall2009-assignment3

# Fall2009-assignment3 - Programming Systems Design CSCI 455...

This preview shows pages 1–2. Sign up to view the full content.

Programming Systems Design CSCI 455 FALL 2009 Dr. K. Narayanaswamy Programming Assignment # 3 Due Date: 9/27/2009 (11:59:59 p.m.) Goal This assignment requires you to understand how to declare and use FUNCTIONS, including passing of parameters by value and reference. Naturally, this assignment also requires you to apply all the prior material that has been taught on this course. Task Task 1: In algebra, n! (pronounced “n Factorial”) is defined as the product of all the integer numbers from n to 1, i.e.,: n*(n-1)*(n-2)…2*1 Your program should implement a function called “factorial” that given a number returns n!. For non-positive numbers or 0, for which factorial is not sensible, factorial should return the value 0. Task 2: Define a function “is_fibonacci” that takes a single integer number as parameter and returns a Boolean result – true if the number appears in the Fibonacci sequence (defined in Assignment 1) and false otherwise. Task 3: Define a function “mystery” that does not return a value as an expression. “mystery” is called as below: mystery(a, b, c, d); // a , b, c, and d are all integers

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern