Sub z()
Dim a(8) As String
For i = 1 To 8
a(i) = InputBox("Введи слово")
Next i
For i = 1 To 8
Cells(i + 1, 1) = a(i)
n = Len(a(i))
Cells(i + 1, 2) = n
Cells(i + 1, 3) = Mid(a(i), 1, 1)
Cells(i + 1, 4) = Mid(a(i), n, 1)
Next i
<span>End Sub
Первую строку не использовал, оставил для заголовков</span>
///////////////////////////////////
#include <iostream>
using namespace std;
int main()
{
int a[7];
int MAX = -1000*1000*1000-13;
for (int i = 0; i < 7; ++i)
cin >> a[i];
if (a[0] > MAX)
MAX = a[0];
if (a[1] > MAX)
MAX = a[1];
if (a[2] > MAX)
MAX = a[2];
if (a[3] > MAX)
MAX = a[3];
if (a[4] > MAX)
MAX = a[4];
if (a[5] > MAX)
MAX = a[5];
if (a[6] > MAX)
MAX = a[6];
cout << MAX;
}
I = 2.
A = 6.
1. A = 6 + 2 = 8.
I = 2 + 1 = 3.
2. A = 8 + 3 = 11.
I = 3 + 1 = 4.
3. A = 11 + 4 = 15.
I = 4 + 1 = 5.
Ответ: A = 15, I = 5.
Программа реализована в Microsoft Word