ci: 💚 Fix file structure
All checks were successful
Tests / Unit Testing1 (push) Successful in 1m1s

This commit is contained in:
2023-11-02 16:29:02 +01:00
parent 6e27660234
commit a42e51b609
8 changed files with 127 additions and 2 deletions

View File

@ -2,5 +2,64 @@ namespace Iteration;
public class Iterations
{
public static int Reverseint(int n)
{
int result = 0;
if (n > 4)
{
for (int i = 0; i <= n; i++)
{
result = result * 10 + n % 10;
n /= 10;
}
if (n == 1)
{
return result * 10 + n;
}
}
else if (n < 4)
{
for (int i = 0; i >= n; i--)
{
result = result * 10 + n % 10;
n /= 10;
}
if (n == -1)
{
return result * 10 + n;
}
}
else
{
return n;
}
return result;
}
public static bool FindSub(string s, string sub)
{
if (sub == "")
{
throw new ArgumentException("sub cannot be empty");
}
string phrase = s;
string[] word = s.Split(' ');
foreach (var mot in word)
{
if (mot == sub)
{
return true;
}
}
return false;
}
public static bool FirstUpper(string s, string sub)
{
return true;
}
}

View File

@ -1,3 +1,3 @@
// See https://aka.ms/new-console-template for more information
Console.WriteLine("Hello, World!");
Console.WriteLine();