0

form an array with elements Akn = nFi + 11 (k) + sin (k) Fi + 12 (n), where u = 3, k, n = 1,2,3,4. Display it as a matrix.

calculate the product of the values ​​of the elements for which the inequality Akn <-1 holds Does my code calculate correctly? #include <iostream> #include <conio.h> #include <math.h> using namespace std; int main() { const int k = 4, n = 4; float a[k][n]; long int mult = 1; for (int k = 0; k < 4; k++) { for (int n = 0; n < 4; n++) { a[k][n] = n * 14 * k + sin(k) * 15 * n; //cout << a[k][n] << " "; cout << k << "\t" << a[k][n] << "\n"; } cout << endl; } if (a[k][n] < -1) mult *= a[k][n]; cout << a[k][n] << " "; cout << "\n" << mult << "\n"; system("pause"); return 0; }

11th May 2020, 1:13 PM
Igor King
3 ответов
+ 6
What's your question about the code? Where are you stuck?
13th May 2020, 9:23 AM
Tashi N
Tashi N - avatar
+ 1
If this is a challenge to other users, please post it in activity feed instead. Else if this is a task you need to do, please try it yourself first and show us what you did. https://www.sololearn.com/discuss/1316935/?ref=app
11th May 2020, 1:21 PM
HonFu
HonFu - avatar
0
did it count everything correctly?
13th May 2020, 10:21 AM
Igor King