Fall2009-assignment3

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

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

View Full Document Right Arrow Icon
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
Background image of page 1

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

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 3

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

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online