sumallmybitches
This commit is contained in:
parent
710137e092
commit
1b01ebe03f
@ -20,10 +20,32 @@ namespace ClassDemo1
|
||||
|
||||
int sum = SumMyBitchUp(420, 69);
|
||||
Write($"Sum: {sum}");
|
||||
int nyVerdi = SumMyBitchUp(sum, 45678);
|
||||
Write($"Ny verdi: {nyVerdi}");
|
||||
|
||||
int allMyBitches = SumAllMyBitchesUp(tall);
|
||||
int allMyBitchesV2 = SumAllMyBitchesUpV2(tall);
|
||||
Write($"DÆTTA ER ALLI SOMMA LAGT SAMMEN, TO FORSKJELLIGE GANGER: {allMyBitches} & {allMyBitchesV2}");
|
||||
|
||||
Console.ReadLine();
|
||||
}
|
||||
|
||||
static int SumAllMyBitchesUp(int[] bitches)
|
||||
{
|
||||
return bitches.Sum();
|
||||
}
|
||||
|
||||
static int SumAllMyBitchesUpV2(int[] bitches)
|
||||
{
|
||||
int sum = 0;
|
||||
foreach (var tall in bitches)
|
||||
{
|
||||
sum = SumMyBitchUp(sum, tall);
|
||||
}
|
||||
|
||||
return sum;
|
||||
}
|
||||
|
||||
static int SumMyBitchUp(int first, int second)
|
||||
{
|
||||
return first + second;
|
||||
|
Loading…
Reference in New Issue
Block a user