main.cpp 926 B

1234567891011121314151617181920212223242526272829303132333435
  1. // #include "char_test.hpp"
  2. // #include "process_bar.hpp"
  3. #include "functions.h"
  4. #include "try_class.hpp"
  5. int main()
  6. {
  7. // test_char();
  8. // rotate();
  9. // test_func();
  10. int num;
  11. std::cout << "Input a num to check if it's prime num:\n> ";
  12. std::cin >> num;
  13. printf(isPrimeNum(num)?"Yes\n":"No\n");
  14. int a = 3, b = 87;
  15. std::cout << "A is " << a << " and B is " << b << std::endl;
  16. swap(a, b);
  17. std::cout << "A is " << a << " and B is " << b << std::endl;
  18. char c = 'c', d = 'd';
  19. std::cout << "C is " << c << " and D is " << d << std::endl;
  20. swap(c, d);
  21. std::cout << "C is " << c << " and B is " << d << std::endl;
  22. something gg("Man", "Human", 228);
  23. gg.add_value(16);
  24. gg.add_value(8);
  25. std::cout << gg.name << std::endl;
  26. std::cout << "Value list:" << std::endl;
  27. for (int v : gg.value_list)
  28. {
  29. std::cout << v << std::endl;
  30. }
  31. return 0;
  32. }