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:
The correct approach is "Phased".
Explanation:
- The pilot step requires just to validate the development's implementation goals and objectives and then when the SDMX objects were introduced to development, several perhaps all problems have indeed been detected as well as logged through so that they're being corrected either by the detailed technical advisory committee.
- The staggered or phased approach towards deployment provides the time possible to obtain the very next knowledge on evaluation criteria, staff including diverse cultures such that the strategy produced could be customized accordingly.
Answer:
Program is in C++
Explanation:
C++ Code
1) By using For Loop
void forLoopFunction(int value){
for(int start=value; start>0; start--){
cout<<start<<endl;
}
}
Explanation
Start for loop by assigning the loop variable to parameter value and condition will be that loop variable will be greater then 0 and at the end decrements the loop variable.
2) By usin WhileLoop
void whileLoopFunction(int value){
while(value>0){
cout<<value<<endl;
value--;
}
}
Explanation
In while loop first add the condition as variable must be greater then 0 and then print the value with endl sign to send the cursor to next line and at the end of the loop decrements the variable.