First Upload

This commit is contained in:
2022-02-25 15:33:16 +02:00
commit 0c74d10f0d
295 changed files with 74784 additions and 0 deletions

30
21 - recorstion/ex1.c Normal file
View File

@@ -0,0 +1,30 @@
#include "General.h"
//---------------------------------------------------------------------------------------
// MaxDigit
// --------
//
// General : Check the max digit in the number.
//
// Parameters :
// num - number (int)
//
// Return value : The max digit in the number (unsigned short).
//
//---------------------------------------------------------------------------------------
// Programmer : Cohen Idan
// Student No : 211675038
// Date : 30.12.2019
//---------------------------------------------------------------------------------------
unsigned short MaxDigit(int num)
{
if (num < TEN)
return (num);
else
return (MAX(MaxDigit(num / TEN), num % TEN));
}
void main(void)
{
}