using System;
namespace ConsoleApp11
{
class Program
{
static void Main(string[] args)
{
Console.Write("Введите N: ");
int N = int.Parse(Console.ReadLine());
double S = 0;
for (int i = 0; i < N; i++)
S += Math.Pow(-1, i) * (1 / Math.Pow(2, i));
Console.WriteLine("Ответ: " + S);
Console.ReadKey();
}
}
}
Ну если это паскаль то тогда :
program a1;
var a,s,d,max : integer;
BEGIN
writeln('введите 3 числа');
readln(a,s,d);
max:=a;
if max<s then max:=s;
if max<d then max:=d;
writeln('max=',max);
<span>end.</span>