using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; namespace exp4_2 { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void button1_Click(object sender, EventArgs e) { //巢狀迴圈 for(int i=1;i<=9 ;i++ ) { for(int j=1; j<=9;j++ ) { label1.Text += i + "*" + j + "=" + i * j + " "; } label1.Text += '\n'; } } } }