1. Write a Fibonacci function then takes an 
input from the user in main program and pass 
to function which prints Fibonacci series up 
to this number.

I'm assuming you don't know what a Fibonacci 
function is, so I'll tell you.  The first two
numbers in it is 0 and 1.  All of the following
ones are the sum of the one before and the one 
before that.

Example: 0, 1 , 0 + 1 = 1, 1 + 1 = 2, 1 + 2 = 3,
2 + 3 = 5, 3 + 5 = 8, and so on.

2. 
Write a C/C++ program which consists of a user-define
function Prime. This function will take a number and
check that the number is prime or not if the number is
prime Display The number is Prime other wise display
The number is not Prime 
Call this function in main program.

For this one: I'd recommend Starting with a 
squareroot of the user's number, then work 
backwards to 2, to seeing if any of the numbers
devides evenly into the user's number.


 
____________________________________________________________________________________
TV dinner still cooling? 
Check out "Tonight's Picks" on Yahoo! TV.
http://tv.yahoo.com/

Reply via email to