-
Вопрос по информатике:
Задания по программированию на С++ С использованием оператора for () написать программу, которая будет выводить на экран: «Введи размерность», затем считывать введенное с клавиатуры целое число и выводить на экран таблицу умножения вида:
(если введено 3)
1 2 3
1 1 2 3
2 2 4 6
3 3 6 9-
Автор:
apple jack
-
-
#include <iostream>
using namespace std;
int main(){
setlocale(LC_ALL, "Russian");
int a;
cout<<"Введи размерность"<<endl;
cin>>a;
int arr[a+1][a+1];
for (int i=1; i<a+1; ++i)
for(int j=1; j<a+1; ++j)
arr[i][j]=i*j;
for (int i=1; i<a+1; ++i) {arr[i][0]=i;arr[0][i]=i;}
cout<<" ";
for (int i=1; i<a+1; ++i){cout<<arr[i][0]<<" ";}
cout<<endl;
for (int i=1; i<a+1; ++i){
for(int j=0; j<a+1; ++j)
cout<<arr[i][j]<<" ";
cout<<endl;
}
return 0;
}
_____
Т.к. в условии про оформление ничего не сказано, то сделал самое обычное
Еще 4 ненужных тебе вопроса, но это важно для поиска
-
Вопрос по математике:
Одна из сторон параллелограмма равна 12 см,большая диагональ - 28 см,а тупой угол - 120 градусов,найти периметр параллелограмма-
Ответов: 1
-
5 лет назад
-
-
Вопрос по английскому языку:
State the functions of the Infinitive in the following sentences. Translate the sentences.
1. To move oil from the place of production to the place of consumption is of prime importance.
2. To move oil from the oil field a new pipeline should be constructed.
3. The pipeline to transport oil from the place of production to the place of consumption is under
construction.
4. The problem is to forecast how much water will be produced.
5. The people in the oil industry have to be broadly knowledgeable to find and to apply new
technologies.
6. To be usable oil must be refined.
7. The effect is too small to be detected.
8. The most important parameter to be examined is the rock porosity of the formation.
9. To raise the field production is to increase the volume of oil to be transported.
10. To prevent energy shortage scientists are experimenting with different sources of energy.
11. The new discoveries to be spoken of were made in this field.-
Ответов: 1
-
5 лет назад
-
-
Вопрос по химии:
Расставьте коэффициент методом электронного баланса .
3) H2O2 + KMnO4 +HNO3 = Mn(NO 3)2 +KNO3 + H2O +O2-
Ответов: 1
-
5 лет назад
-
-
Вопрос по информатике:
С++
Написать программу, которая будет выводить на экран слово: «Привет!» двумя способами: с помощью функций cout << ; и printf();-
Ответов: 1
-
5 лет назад
-