Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- int main()
- {
- double array[10];
- for (int i = 0; i < 10; i++) {
- std::cout << "Enter " << i + 1 << "th value " << std::endl;
- if (!(scanf_s("%lf", &array[i]))) {
- std::cout << "Wrong input." << std::endl;
- fseek(stdin, 0, SEEK_END);
- i -= 1;
- }
- }
- int mas_size = 10 * sizeof(double);
- int double_size = sizeof(double);
- _asm {
- finit
- xor esi, esi
- cycle1 :
- fld1
- fdiv array[esi]
- fstp array[esi]
- add esi, double_size
- cmp esi, mas_size
- jne cycle1
- }
- std::cout << "Results:" << std::endl;
- for (int i = 0; i < 10; i++) {
- std::cout << array[i] << std::endl;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement