Advertisement
Yanislav29

Untitled

Jan 21st, 2020
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1. #include <iostream>
  2. #include "KontrolnoMn.h"
  3. #include <cmath>
  4. #include<cstring>
  5. using namespace std;
  6. int fillSet(char * set, unsigned sz) {
  7. for (size_t i = 0; i < sz; i++)
  8. {
  9. cin >> set[i];
  10. }
  11. return 0;
  12. }
  13. int print(char * set, unsigned sz) {
  14. for (size_t i = 0; i < sz; i++)
  15. {
  16. cout << set[i] << " ";
  17. }
  18. cout << endl;
  19. return 0;
  20. }
  21. int Count_Nums_toRemove(char *set, unsigned size,char *setA,unsigned szB) {
  22.  
  23. bool f = false;
  24. int cnt = 0;
  25. for (size_t i = 0; i < size; i++)
  26. {
  27. f = false;
  28. for (size_t j =0; j < szB; j++)
  29. {
  30. if (set[i] != setA[j]) {
  31. f = true;
  32. break;
  33.  
  34. }
  35. }
  36. if (f) {
  37. cnt++;
  38. }
  39.  
  40. }
  41.  
  42.  
  43.  
  44.  
  45. cout << "The number is:" << " " << cnt << endl;
  46.  
  47. return 0;
  48. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement