#include <iostream>using namespace std; int main(){ setlocale(LC_ALL, "Russian"); int number=2, number_of_seats=20, full_number, all_people, number_of_standing=10, rashod_all_fuel, number_of_seats__procent, road, number_of_seats_procent, number_of_standing_procent, full_procent, pribl, doroga, coust_fuel, rashod_fuel; cout<<"Введи кількість поїздок"<<endl; cin>>road; full_number=number_of_seats+number_of_standing; full_procent=road*(full_number*0.5); number_of_seats_procent=road*(full_number*0.3); number_of_seats__procent=number_of_seats_procent*0.5; cout<<"Введи проїханий маршут в км"<<endl; cin>>doroga; cout<<"Вартість пального"<<endl; cin>>coust_fuel; cout<<"Расход бензина на 100 км"<<endl; cin>>rashod_fuel; rashod_all_fuel=(road*doroga)*(coust_fuel*rashod_fuel); all_people=number*(full_procent+number_of_seats_procent-number_of_seats__procent); cout<<"Вигода = "<<all_people<<" гривень"<<endl; cout<<"Вигода = "<<all_people-rashod_all_fuel<<" гривень"<<endl; return 0;}
(C#)
N=Console.Read();
Console.Write(N);
N=N-2//на случай если N=2 или 1
while(N>3)
{
N=N-2
Console.Write(N);
}
Var
i:integer;
a:array [1..8] of real;
begin
randomize;
for i:=1 to 8 do
begin
a[i]:=8+ Random;
writeln(a[i]:0:2);
end;
end.
//Pascal ABC.NET 3.1 сборка 1256
Var
b,a,m,ar:real;
i:integer;
begin
readln(b,m,a);
i:=0;
ar:=a*m;
while ar>a do
begin
inc(i);
a:=a*(b/100+1);
end;
writeln(i);
end.
Пример ввода:
33
2
100
Пример вывода:
3