Hello. There is such code:
TextView NumbZK = (TextView)findViewById(R.id.editText2); final int Numb = Integer.parseInt(NumbZK.getText().toString()); TextView modN = (TextView)findViewById(R.id.editText1); final int N = Integer.parseInt(modN.getText().toString()); TableLayout table = (TableLayout) findViewById(R.id.tL1); TableRow tr = (TableRow) findViewById(R.id.tR1); TextView tv = (TextView) findViewById(R.id.field1); int[] mas = new int[N]; for (int i=0; i<N;i++){ mas[i]=(Numb%(i+1)); table.removeView(tr); tr.removeView(tv); tv.setText((i+1)+") "+(Numb%(i+1))); tr.addView(tv); table.addView(tr); } The idea is to add table rows dynamically in a loop. In the end, you should get something like this:
1) [Numb mod 1]
2) [Numb mod 2]
...
3) [Numb mod 20]