Click here to Skip to main content
15,891,529 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Simpler way to determine type of sequence Arithmetic or Geometric progression
Posted
Updated 3-Aug-14 0:00am
v2

We do not do your homework: it is set for a reason. It is there so that you think about what you have been told, and try to understand it. It is also there so that your tutor can identify areas where you are weak, and focus more attention on remedial action.

Try it yourself, you may find it is not as difficult as you think!
 
Share this answer
 
Comments
Mayuresh Deolekar 3-Aug-14 8:37am    
Hello sir will you review my code to make any improvements
If you have implemented them separately then it should be pretty straightforward to merge them. I would first try to determine if the given sequence is an AP and, upon failure, repeat the test with the GP.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900