Matrix Program
you are given an m*n matrix.write a program to compute the perimeter of the matrix and print the result.Perimeter of a matrix is defined as the sum of all elements of the four edges of the matrix.
Input
The first line of input containing the positive integer.
The second line of input containing the positive integer.
The next N lines of input space-separated integers.
Explanation: The input should be
3
4
1 2 3 4
5 6 7 8
9 10 11 12
The output should be 65.
Sample Input1
4
4
1 2 3 4
5 6 7 8
9 10 11 12
13 14 15 16
Sample Output1
102
Define terms of trade and explain how the terms of trade will be affected in south Africa by the increase in commodity prices
Explain the two characteristics of the Cobb Douglas production
function that make it particularly useful to macroeconomists
Explain the two characteristics of the Cobb Douglas production
function that make it particularly useful to macroeconomists
A teacher asked Ramesh to draw a Quadrilateral of a specific pattern with only symbol. The length and height should be L. Here L is the number of characters in every line. The height of the * quadrilateral is the number of lines it contains.
The slope of the quadrilateral taken as S represents the the number of extra space characters in a line when compared to its next line.
The last line will not have any space characters before the * character.
Sample Input1
6 9
Sample Output1
******
******
******
******
******
******
product of array items
given an array integers, write a JS program to get the product of the given integers in the array
sample input1
[1,2,3]
sample output1
1*2*3 = 6
"use strict";
process.stdin.resume();
process.stdin.setEncoding("utf-8");
let inputString = "";
let currentLine = 0;
process.stdin.on("data", (inputStdin) => {
inputString += inputStdin;
});
process.stdin.on("end", (_) => {
inputString = inputString
.trim()
.split("\n")
.map((str) => str.trim());
main();
});
function readLine() {
return inputString[currentLine++];
}
function main() {
let integers = JSON.parse(readLine());
/* Please do not modify anything above this line */
/* Write your code here and log the output */
}
INPUT:
[1,2,3]
OUTPUT:
1*2*3 = 6
INPUT:
[-1,-2,-3]
OUTPUT:
-1*-2*-3 = -6 SHOULD BE LIKE THIS
What is the law of demand
A researcher estimated the following equations in the demand and supply of shirts. D=200-25p S=16+11p. Calculate the equilibrium price and quantity.
Write an algorithm using pseudocode to verify that a password's length exceeds 8 characters, but is shorter than 12 characters. (INCLUSIVE 8-12)
Write an algorithm using pseudocode to check the age and height of a child who wants to go on a fairground ride. The child's age must exceed 7, but below 12, their height must exceed 110 cm, but below 150 cm.