会用代码敲九九乘法表输出,但不知道如何在使用visual studio下实现窗体的九九乘法表
3条回答 默认 最新
- weixin_53515141 2021-07-05 16:08关注
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 WindowsFormsApplication3
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}private void label1_Click(object sender, EventArgs e) { } private void Form1_Load(object sender, EventArgs e) { label1.Text = "九九乘法表:\n\n"; for (int i = 1; i < 10; i++) { for (int j = 1; j <= i; j++) { label1.Text += (j + "*" + i + "=" + i * j + " "); } label1.Text += "\n"; } } }
}
本回答被题主选为最佳回答 , 对您是否有帮助呢?解决 无用评论 打赏 举报