Added last three homeworks

This commit is contained in:
AZEN-SGG 2025-03-02 14:38:34 +03:00
parent f7b2367bc4
commit 0e3d948c9f
363 changed files with 18214 additions and 0 deletions

View file

@ -0,0 +1,18 @@
#include "compare.h"
int up_strcmp(const char *a, const char *b)
{ return strcmp(a, b); }
int down_strcmp(const char *a, const char *b)
{ return strcmp(b, a); }
int up_len(const char *a, const char *b)
{
ssize_t diff = (ssize_t)strlen(a) - (ssize_t)strlen(b);
if (diff < 0) return -1;
if (diff > 0) return 1;
return up_strcmp(a, b);
}
int down_len(const char *a, const char *b)
{ return up_len(b, a); }