main.cpp 653 B

123456789101112131415161718192021222324
  1. // #include "char_test.hpp"
  2. // #include "process_bar.hpp"
  3. #include "functions.h"
  4. int main()
  5. {
  6. // test_char();
  7. // rotate();
  8. // test_func();
  9. int num;
  10. std::cout << "Input a num to check if it's prime num:\n> ";
  11. std::cin >> num;
  12. printf(isPrimeNum(num)?"Yes\n":"No\n");
  13. int a = 3, b = 87;
  14. std::cout << "A is " << a << " and B is " << b << std::endl;
  15. swap(a, b);
  16. std::cout << "A is " << a << " and B is " << b << std::endl;
  17. char c = 'c', d = 'd';
  18. std::cout << "C is " << c << " and D is " << d << std::endl;
  19. swap(c, d);
  20. std::cout << "C is " << c << " and B is " << d << std::endl;
  21. return 0;
  22. }