概要
vistaでandroid studio 1.0.1やってみた。
練習問題やってみた。
練習問題
九九を実装せよ。
写真
サンプルコード
public void run(View view) {
TextView tv = (TextView) findViewById(R.id.chage);
String dis = "";
for (int col = 1; col <= 9; col++)
{
for (int row = 1; row <= 9; row++)
{
if (col * row < 10) dis += " ";
dis += String.valueOf(col * row);
dis += " ";
}
dis += "\n";
}
tv.setText(dis);
}
以上。