int a; try{ if (a < 0) thrwo a; std::cout << "a 는 양수" << std::endl; } catch (int a){ std::cout << "a 는 음수" << std::endl; }