Advertisement
Levii_Valenok

Untitled

May 19th, 2022
543
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <iostream>
  2. #include <math.h>
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7.     float f_arr[10] = {};
  8.     for (size_t i = 0; i < 10; i++)
  9.     {
  10.         cout << i << " >>> ";
  11.         cin >> f_arr[i];
  12.         if (f_arr[i] > pow(2, 63) || f_arr[i] < pow(-2, 63))
  13.         {
  14.             cout << "Number is invalid" << endl;
  15.                 return 0;
  16.         }
  17.     }
  18.  
  19.     float f_sin;
  20.         for (size_t i = 0; i < 10; i++)
  21.         {
  22.             float num = f_arr[i];
  23.                 _asm {
  24.                 finit
  25.                 fld num
  26.                 fsin
  27.                 fst f_sin
  28.             }
  29.             cout << f_sin << endl;
  30.         }
  31.  
  32.     return 0;
  33. }
Advertisement
RAW Paste Data Copied
Advertisement