C++ dasturining misollari: C++ dasturida faqat C++03 yordamida kompilyatsiya vaqtida raqamning faktorialini hisoblash uchun: #include <iostream> shablon <int N> struct Factorial { enum { value = N * Factorial<N - 1>::value }; }; shablon <> struct Factorial<0> { enum { value = 1 }; }; int main ((() { std::cout << "5 ning faktoriali " << Factorial<5>::value << std::endl; return 0; } Ushbu dastur shema metaprogramming deb nomlangan uslubdan foydalanadi, bu esa kompilyatsiya vaqtida hisob-kitoblarni amalga oshirishga imkon beradi. Faktorial shablon N ning faktorialini N - 1 ning faktoriali bilan ko'paytirgan holda hisoblash uchun rekursiv tuzilmani belgilaydi
spam fails_task lang_mismatch pii not_appropriate hate_speech sexual_content quality toxicity humor helpfulness creativity violence