dimanche 2 avril 2017

C++ Two dimensional array multiplication table

I am using C++ and want to do a 2-dimensional array. 10 rows and 3 columns. First column is(1 through 10). For Second column, user enters his/her choice of a number from (1-10) resulting in a times table displaying the results as follows: In this example the user's choice is '4':

1x4=4  
2x4=8  
3x4=12  
4x4=16  
5x4=20  
6x4=24  
7x4=28  
8x4=32  
9x4=36  
10x4=40 

I can't get the user's input to calculate correctly when using the for loop.

Aucun commentaire:

Enregistrer un commentaire