Вот, в общем, видео с уроком програмирования для новичков :
А вот и код Kakul'a измененный для Pascal ABC
Код
procedure Form1.button1_Click(sender: Object; e: EventArgs);
var a,b,c: real;
var message: string;
begin
a:= Convert.ToDouble(numericupdown1.Value);
b:= Convert.ToDouble(numericupdown2.Value);
writeln ('ввод a = ',a);
writeln ('ввод b = ',b);
// Сумма
if (ComboBox1.SelectedItem.ToString = '+') then writeln ('Выбрано действие ',ComboBox1.SelectedItem);
if (ComboBox1.SelectedItem.ToString = '+') then c:=a+b;
if (ComboBox1.SelectedItem.ToString = '+') then message := 'Действие a+b = ';
// Разность
if (ComboBox1.SelectedItem.ToString = '-') then writeln ('Выбрано действие ',ComboBox1.SelectedItem);
if (ComboBox1.SelectedItem.ToString = '-') then c:=a-b;
if (ComboBox1.SelectedItem.ToString = '-') then message := 'Действие a-b = ';
// Произведение
if (ComboBox1.SelectedItem.ToString = '*') then writeln ('Выбрано действие ',ComboBox1.SelectedItem);
if (ComboBox1.SelectedItem.ToString = '*') then c:=a*b;
if (ComboBox1.SelectedItem.ToString = '*') then message := 'Действие a*b = ';
// Частное
if (ComboBox1.SelectedItem.ToString = '/') then writeln ('Выбрано действие ',ComboBox1.SelectedItem);
if (ComboBox1.SelectedItem.ToString = '/') then c:=a/b;
if (ComboBox1.SelectedItem.ToString = '/') then message := 'Действие a/b = ';
writeln (message,c);
richTextBox1.text := message;
richTextBox1.AppendText(FloatToStr(c));
end;
var a,b,c: real;
var message: string;
begin
a:= Convert.ToDouble(numericupdown1.Value);
b:= Convert.ToDouble(numericupdown2.Value);
writeln ('ввод a = ',a);
writeln ('ввод b = ',b);
// Сумма
if (ComboBox1.SelectedItem.ToString = '+') then writeln ('Выбрано действие ',ComboBox1.SelectedItem);
if (ComboBox1.SelectedItem.ToString = '+') then c:=a+b;
if (ComboBox1.SelectedItem.ToString = '+') then message := 'Действие a+b = ';
// Разность
if (ComboBox1.SelectedItem.ToString = '-') then writeln ('Выбрано действие ',ComboBox1.SelectedItem);
if (ComboBox1.SelectedItem.ToString = '-') then c:=a-b;
if (ComboBox1.SelectedItem.ToString = '-') then message := 'Действие a-b = ';
// Произведение
if (ComboBox1.SelectedItem.ToString = '*') then writeln ('Выбрано действие ',ComboBox1.SelectedItem);
if (ComboBox1.SelectedItem.ToString = '*') then c:=a*b;
if (ComboBox1.SelectedItem.ToString = '*') then message := 'Действие a*b = ';
// Частное
if (ComboBox1.SelectedItem.ToString = '/') then writeln ('Выбрано действие ',ComboBox1.SelectedItem);
if (ComboBox1.SelectedItem.ToString = '/') then c:=a/b;
if (ComboBox1.SelectedItem.ToString = '/') then message := 'Действие a/b = ';
writeln (message,c);
richTextBox1.text := message;
richTextBox1.AppendText(FloatToStr(c));
end;
А это весь проект на Pascal ABC в архиве