Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int x = 5, b, a[20][20];
- int main() {
- cin >> b;
- _asm {
- mov ecx, 1
- lea esi, a
- _loop:
- mov eax, ecx
- mul x
- push esi
- _l2:
- cdq
- div b
- mov [esi], edx
- add esi, 4
- cmp eax, 0
- jg _l2
- pop esi
- add esi, 80
- inc ecx
- cmp ecx, b
- jl _loop
- }
- for (int i = 0; i < b - 1; ++i) {
- int j = 19;
- while (a[i][j] == 0 && j > 1) --j;
- while (j >= 0) {
- cout << a[i][j] << " ";
- --j;
- }
- cout << endl;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment