Class 5 1. The theme:Design and creation of the presentations of lecture material, scientific reports, etc.
4.Key questions of the theme:
1. Which of the following method can insert a new slide in current presentation?
2. Which command will you use in PowerPoint if you need to change the color of different objects without changing content?
3. Which file format can be added to a PowerPoint show?
4. What is a slide-title master pair?
5. How can you create a uniform appearance by adding a background image to all slides?
6. Which option on the custom animation task pane allows you to apply a preset or custom motion path?
7. Which of the following features should you use when typing in the notes text box?
8. Control questions:
1. What is a computer presentation?
2. What is a slide? What does it consist of?
3. How can you create a new presentation?
4. What is the presentation template?
5. What is the design theme?
6. How can you add a new slide in the presentation?
7. How can you delete a slide?
8. How do you change the order of slides in your presentation?
9. How to change the background and color on the slide?
10. How do you add the table to the slide?
import random
a = [0] * 4
for i in range(4):
a[i] = [0] * 4
mi = 1
mj = 1
print("Матрица A:")
for i in range (4):
for j in range (4):
a[i][j] = random.randint(10,99)
if a[i][j]>a[mi][mj]:
mi = i
mj = j
print("%3d" % (a[i][j]),end="")
print()
print("Максимум: A[{0},{1}] = {2}".format(mi+1,mj+1,a[mi][mj]))
Объяснение:
Создаём матрицу заполненную 0
Задаём начальные значения максимальных индексов
Заполняем матрицу случайными числами, ищем максимальные индексы и выводим элементы на экран
Выводим максимальные индексы и значение элемента
#include <iostream>
#include <vector>
#include <map>
using namespace std;
int main(){
int n;
cin >> n;
vector<vector<int>> a(n, vector<int> (n));
vector<int> x(2*n);
map<int,int> m;
for(int i = 0; i < n; i++)
for(int j = 0; j < n; j++)
cin >> a[i][j];
int cur1 = 1, cur2 = 0, elem = 0, cnt = 0;
for(int i = 0; i < n; i++){
for(int j = 0; j < n; j++){
if(i == j){
x[cur1] = a[i][j];
cur1 += 2;
m[a[i][j]]++;
if(m[a[i][j]] > cnt){
cnt = m[a[i][j]];
elem = a[i][j];
}
}
if(i + j == n - 1){
x[cur2] = a[i][j];
cur2 += 2;
m[a[i][j]]++;
if(m[a[i][j]] > cnt){
cnt = m[a[i][j]];
elem = a[i][j];
}
}
}
}
for(auto &i : x) cout << i << " ";
cout << "\nThe most popular element is : " << elem;
}