using System;
using System.Collections.Generic;
using System.Text;
using System.ComponentModel;
using System.Collections;
using System.Data;
using System.Drawing;
using System.Windows.Forms;
public class SquareInt : System.Windows.Forms.Form
{
private System.Windows.Forms.Button calculateButton;
private System.Windows.Forms.Label outputLabel;
[STAThread]
static void Main(string[] args)
{
Application.Run(new SquareInt());
}
int square(int y)
{
return y * y;
}
private void calculateBotton_Click(object sender, System.EventArgs e)
{
outputLabel.Text = "";
for (int counter = 1; counter <= 10; counter++)
{
int result = square(counter);
outputLabel.Text += "The square of " + counter + "is : " + result + "\n";
}
}
}هذ الكود موجود فى الكتاب اللى بذاكر فيه ؛ لطباعة مربعات الاعداد من 1 الى 10؛ بس عند التنفيذ لا يحد المطلوب فلا تبخلوا على بالرد فانا فى امس الحاجة للمساعدة جزاكم الله عنى كل خير