<prompt> Kujenga kazi ya kuangalia ni orodha ni sorted katika kuongezeka kushuka hakuna utaratibu. Anarudi Enum. Matumizi C .  <response>: Heres a C function that checks if a given list is sorted in ascending, descending, or neither order:include include enum class Order ascending, descending, none;Order checkOrderconst std::vector list bool is_ascending true; bool is_descending true; for size_t i 1; i list.size; i if listi listi-1 is_descending false; else if listi listi-1 is_ascending false; if is_ascending return Order::ascending; else if is_descending return Order::descending; else return Order::none; int main std::vector list_ascending 1, 2, 3, 4, 5; std::vector list_descending 5, 4, 3, 2, 1; std::vector list_none 1, 3, 2, 5, 4; std::cout List ascending: checkOrderlist_ascending Order::ascending ? Sorted in ascending order : Not sorted in ascending order std::endl; std::cout List descending: checkOrderlist_descending Order::descending ? Sorted in descending order : Not sorted in descending order std::endl; std::cout List none: checkOrderlist_none Order::none ? Not sorted : Sorted std::endl; return 0;This program defines an Order enumeration with three possible values: ascending, descending, or none. The checkOrder function takes a reference to a std::vector as an argument, and iterates over the elements of the vector to determine if the list is sorted in ascending, descending, or neither order. The main function demonstrates how to use the checkOrder function with three example lists, and outputs whether each list is sorted in ascending, descending, or neither order. 