censusMatrix() nie je dokoncena
Kód: Vybrať všetko
#include <iostream>
#include <iomanip> // for using manipulators
using namespace std;
void createMatrix1 (int rows, int columns) // Creating matrix one
{
int const N=20;
int matrix1[N][N];
for (int i = 1; i <= rows; i++)
for (int j = 1; j <=columns; j++){
cout << "Enter the "<< j <<". element on "<< i <<". line at second matrix\n";
cin >> matrix1[i][j];
}
}
void cerateMatrix2 (int rows, int columns) // Creating matrix two
{
int const N = 20;
int matrix2[N][N];
for (int i = 1; i <= rows; i++)
for (int j = 1; j <=columns; j++){
cout << "Enter the "<< j <<". element on "<< i <<". line at second matrix\n";
cin >> matrix2[i][j];
}
}
void censusMatrix()
{
int rows, columns;
for (int i = 1; i <= rows; i++)
for (int j = 1; j <=columns; j++);
}
int main(void)
{
cout << "Choose your operation: \n";
cout << "Press 1 for counting two matrices \n";
cout << "Press 2 for matrix * scalar \n";
cout << "Press 3 for matrix * vector \n";
cout << "Press 4 for matrix * matrix \n";
cout << "Press 5 for repetitions \n";
cout << "Press 0 for exit \n";
int choice;
cin >> choice;
system("cls");
while (choice =! 0)
{
switch (choice) {
case 1 :
int rows, columns;
cout << "Enter the number of rows at frist matrix \n";
cin >> rows;
cout << "Enter the number of columns at frist matrix \n";
cin >> columns;
createMatrix1(rows, columns);
system("cls");
cerateMatrix2(rows, columns);
system("cls");
break;
}
}
return 0;
}