i am a newbie in c++ programming.i realli need help!!!tis is the code tat i wrote for constructing timetable.could anybody pls help mi!!!i do nt knw which part of my code is wrong.i do nt knw y my program will go infinite loop.
First, please use code tags when posting your code. They can be found as the # symbol on the Format toolbar.
Now on to your problems.
You never change i or n in your final for loop in displayTimeTable, so the loop will never exit. You should probably be comparing j <=i since you seem to be using j as your counter and multiplier.
Once you fix that you'll notice you're one column short (don't blame you for not seeing in that mess) so you'll want to make your second for loop in displayTimeTable go till n <= i instead of just n < i.
edit: btw, your code will currently only print out square tables. You need to stop overwriting your variables in displayTimeTable if you want it to print non-square times tables.
You are also prompting the user for two integers, but since you pull it into n both times you will only get the last value entered (columns). Therefore you will never pull in the rows value and return it to your main.