Guest User

Untitled

a guest
Dec 11th, 2016
148
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. using namespace std;
  2.  
  3. void main()
  4. {
  5. int y = 0;
  6. int i = 0;
  7. int size = 20;
  8. char* str = new char[size];
  9. cout << "Enter your string, please: \n";
  10. cin.getline(str, size);
  11. char *qw = strtok(str, " ");
  12. while (qw != NULL)
  13. {
  14. //cout << qw << endl; //выводим строки
  15.  
  16. int x = 0;
  17. x = strlen(qw);
  18. _asm
  19. {
  20. xor EAX, EAX
  21. xor EBX, EBX
  22.  
  23. mov EAX, x
  24. mov EBX, 2
  25.  
  26. cmp EAX, EBX
  27. je s
  28. jne f
  29. s :
  30. xor ECX, ECX
  31. mov ECX, 1
  32. mov y, ECX
  33. f :
  34. xor ECX, ECX
  35. mov ECX, 0
  36. mov y, ECX
  37. }
  38.  
  39. qw = strtok(NULL, " ");
  40. }
  41. if (y = 1)
  42. {
  43. i++;
  44.  
  45.  
  46. }
  47.  
  48. cout << i << endl;
  49.  
  50. system("pause");
  51. //return 0;
  52. }
Add Comment
Please, Sign In to add comment