Среднее значение округляется до целого(дробная часть отсекается)
#include <iostream>
using std::cout;
using std::cin;
using std::endl;
int main()
{
int a[10];
int sum = 0;
cout << "Enter the growth of ten people:" << endl;
for(int i = 0; i < 10; i++)
{
cin >> a[i];
sum += a[i];
}
cout << "\nThe total growth of all people equal to " << sum << "sm"
<< "\nThe average growth of all people equal to " << (sum / 10) << "sm" << endl;
return 0;
}
Var s:string;
i,a:longint;
begin
readln(s);
for i:=1 to length(s) do
if (s[i]='-') or (s[i]='*') or (s[i]='/') or (s[i]=',') then
inc(a);
writeln(a);
<span>end.</span>
A = list()
N = int(input('Кол-во элементов в массиве: '))
for i in range(N):
A.append(int(input('Элемент ' + str(i+1) + ': ')))
print('Вывод в обратном порядке')
for i in range(len(A)-1,-1,-1):
print(A[i])
Это. очень смешно. папа. съел все. апельсины
1) Костюм;
2) Фон;
3) Алгоритм;
4) Игра;
5) Анимация;
6) Цель;
7) Уровень;
8) Персонаж;
9) Скрипт;
10) Сценарий.
Надеюсь ответ достаточно полон.