Это_____справка____________)
{
Free Pascal Compiler version 2.6.4+dfsg-8 [2015/08/14] for x86_64
Copyright (c) 1993-2014 by Florian Klaempfl and others
}
program X_and_Y;
Var count, n, sum : integer;
begin
writeln('Введите 5 чисел:');
count:=1;
sum:=0;
while count<=5 dobegin
readln(n);
sum := sum+n;
inc(count);
end;
writeln('Сумма равна ', sum);
sum := 0;
for count:=1 to 5 dobegin
readln(n);
inc(sum, n);
end;
writeln('Сумма равна ', sum);
end.
Using System;
class Calc
{
static void Main(string[] args)
{
double s = 0;
for (int i = 1; i < 11; i++)
{
s += (double)1 / i;
}
Console.WriteLine(s);
Console.ReadKey();
}
}
Alt вродебы..............................