From scientists planing to share information across countries. Letters and the mail system took to long for certain situations.
Answer:
#include <iostream>
#include <cstdlib>
using namespace std;
int m, n;
void transpose(int matrix[]){
int transp[m][n];
for (int i = 0; i < n; i++){
for (int j = 0; j < m; j++){
transp[j][i] = matrix[i][j];
cout<< transp[j][i]<< " ";
}
cout<< "\n";
}
}
int main(){
cout<< "Enter the value for n: ";
cin>> n;
cout>> "Enter the value for m: ";
cin>> m;
int mymatrix[n][m];
for (int i = 0; i < n; i++){
for (int j = 0; j < m; j++){
mymatrix[i][j] = (rand() % 50);
}
}
transpose(mymatrix);
}
Explanation:
The C source code defined a void transpose function that accepts a matrix or a two-dimensional array and prints the transpose on the screen. The program gets user input for the row (n) and column (m) length of the arrays. The C standard library function rand() is used to assign random numbers to the array items.
Answer:
Variable, operator, expression, value.
Explanation:
We could use variables, operators, expressions, and values in a mathematical formula, we're going to do an example with every part.
For this example we're going to use a simple sum formula:
First, we have 3 variables:
sum;
sum1;
sum2;
Second, we have 3 operators:
=, + and *
Third, we have our expression and 1 value:
sum = sum1 + (sum2 * 5);
(sum2 * 5) = expression;
5 = value;
We're going to see the result when we print the variable sum.
Answer:
Explanation:
Operation Address Hit? Read Value
Read 0x834 No Unknown
Write 0x836 Yes (not applicable)
Read 0xFFD Yes CO