Tuesday, July 5, 2011

Assignment - Week 2

1. Create a program, which can be used to determine if a number is prime number or not.

2.a Create a program for Fibonacci value finding for any number
2.b Create a program for Factorial value finding for any number. 

3. Create a program using a character array to make it reverse in such a way that 
char[] input = {'t','h','e',' ','q','u','i','c','k',' ','b','r','o','w','n',' ','f','o','x',' ','j','u','m','p','s',' ','o','v','e','r',' ','t','h','e',' ','l','a','z','y',' ','d','o','g'}
char[] output={'e','h','t',' ','k','c','i','u','q',' ','n','w','o','r','b',' ','x','o','f',' ','s','p','m','u','j',' ','r','e','v','o',' ','e','h','t',' ','y','z','a','l',' ','g','o','d'};
Note: for assignment #3, you can only use character array & loops.

No comments:

Post a Comment