Var a:array[1..15]of integer;
i,max:integer;
Begin
for i:= 1 to 15 do
a[i]:=random(100);
max:= a[1]+a[2];
for i:= 1 to 14 do
if max < a[i]+a[i+1] then
max := a[i]+a[i+1];
writeln(max);
End.
gcc 7/3/0
c++
#include <iostream>
#include <iterator>
#include <vector>
#include <algorithm>
int main()
{
std::cout << "Вводите числа по порядку. Символ, отличный от цифры - конец ввода." << std::endl;
std::vector<int> vec(std::istream_iterator<int>(std::cin), std::istream_iterator<int>());
std::copy(vec.rbegin(), vec.rend(), std::ostream_iterator<int>(std::cout, " "));
std::cout << std::endl;
return 0;
}
Var x, a : real;
begin
readln(a);
x := arctan(1/(power(E, a) + 1)) + PI;
writeln(x);
end.
Файл input.txt : Мама, короче, мыла, короче, раму. Декан, короче, пропил, короче, бутан. А роза, короче, упала на лапу, короче,
СиСо [50]
C#
3:
using System.IO;
using System;
namespace тылпыа
{
class Program
{
public static void Main(string[] args)
{
StreamReader reader = new StreamReader("input.txt");
StreamWriter writer = new StreamWriter("output.txt");
string input = " ";
while (true) {
input = reader.ReadLine();
if (input == null) {
break;
}
writer.WriteLine(input.Replace(", короче,", ", в общем,"));
}
writer.Close();
}
}
}