Advertisement
Guest User

newfile.cxx

a guest
Dec 10th, 2018
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.52 KB | None | 0 0
  1. #include <iostream>
  2. #include <cmath>
  3.  
  4. using namespace std;
  5.  
  6. int main()
  7. {
  8.     int i, d;
  9.     int a;
  10.     printf("Enter x of matrix \n");
  11.     cin >> a;
  12.     int b;
  13.     printf("Enter y of matrix \n");
  14.     cin >> b;
  15.     int mass[a][b];
  16.     for (i = 0; i < a; i++)
  17.     {
  18.         for (d = 0; d < b; d++)
  19.         {
  20.             cout<<"Enter"<<i+1<<":"<<d+1<<endl;
  21.             cin >> mass[i][d];
  22.         }
  23.     }
  24. for (i = 0; i < a; i++)
  25.     {
  26.         for (d = 0; d < b; d++)
  27.         {
  28.             cout<<i+1<<":"<<d+1<<"'s pow(x,2)= "<<pow(mass[i][d],2)<<endl;
  29.         cout<<i+1<<":"<<d+1<<"'s sqrt(x)= "<<sqrt(mass[i][d])<<endl;
  30.         }
  31.     }
  32.        
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement