Copied step 2

This commit is contained in:
MarcUs7i 2025-05-08 16:27:25 +02:00
parent da115cb5d6
commit 366effebec
11 changed files with 626 additions and 70 deletions

View file

@ -1,9 +1,9 @@
/*-----------------------------------------------------------------------------
* HTBLA-Leonding / Class: <your class name here>
* HTBLA-Leonding / Class: 2IHIF
*-----------------------------------------------------------------------------
* Exercise Number: S06
* Exercise Number: S05
* Title: Sorting criteria
* Author: */<your name>;/*
* Author: Marc Tismonar
*-----------------------------------------------------------------------------
* Description:
* Implementation of sorting criteria
@ -11,3 +11,25 @@
*/
#include "sorting_criteria.h"
/**
* Determines whether or not `fst` is smaller than or equal to `snd` (ascending order).
*
* @param fst The value that is supposed being smaller than `snd`.
* @param snd The value to compare.
* @return True if `fst` is smaller than or equal to `snd`, false otherwise.
*/
bool is_in_asc_order(int fst, int snd) {
return fst <= snd;
}
/**
* Determines whether or not `fst` is greater than or equal to `snd` (descending order).
*
* @param fst The value that is supposed being greater than `snd`.
* @param snd The value to compare.
* @return True if `fst` is greater than or equal to `snd`, false otherwise.
*/
bool is_in_desc_order(int fst, int snd) {
return fst >= snd;
}