when C=N then the code run. but when N>C eclipse is showing error message pointing SumOfWkjm() Here in code C=5, so when N=5,it works, but when N=6 it is showing error message. Here is the full project - https://onedrive.live.com/?cid=9a23cd9d216bc283&id=9A23CD9D216BC283!193[^]