Problem #1:
Your dev lead wants to plan a celebration for the 100th code war event that we have as a team. Since we only do code wars on the 5th Friday of the month what date will the 100th event fall on?
Include 4/29/22 as the first event day.
Problem #2:
The problem is the same except we are only going to do code wars on the 5th Fridays that occur in February.
Use C #
Use this code to implement the solution:
using System;
using System.Diagnostics;
namespace September
{
/// <summary>
/// April Code War
/// </summary>
class Program
{
/// <summary>
/// Main method
/// </summary>
static void Main()
{
// Accuracy Test
Console.WriteLine(Calculate100thFifthFriday());
Console.WriteLine(Calculate100thFebruaryFifthFriday());
Console.Out.WriteLine();
Console.Out.WriteLine();
// Speed Test
Console.Out.WriteLine("Hit enter to start speed test");
Console.In.ReadLine();
Console.Out.WriteLine("Starting Speed Test");
Stopwatch sw = new Stopwatch();
sw.Start();
for (int i = 0; i < 100000; i++)
{
Calculate100thFifthFriday();
}
sw.Stop();
Console.Out.WriteLine("StopwatchTime:\t" + sw.ElapsedMilliseconds);
sw.Restart();
for (int i = 0; i < 100000; i++)
{
Calculate100thFebruaryFifthFriday();
}
sw.Stop();
Console.Out.WriteLine("StopwatchTime:\t" + sw.ElapsedMilliseconds);
Console.In.ReadLine();
}
// Change the signature of the following method as needed for your solution
/// <summary>
/// Finds candidate matches for a set of criteria
/// </summary>
/// <returns>Number of matching candidates for a set of criteria</returns>
public static string Calculate100thFifthFriday()
{
return "";
}
/// <summary>
/// Finds candidate matches for a set of criteria
/// </summary>
/// <returns>Number of matching candidates for a set of criteria</returns>
public static string Calculate100thFebruaryFifthFriday()
{
return "";
}
}
}
Problem #1: Your dev lead wants to plan a celebration for the 100th code war event that we have as a team. Since we onl
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
Problem #1: Your dev lead wants to plan a celebration for the 100th code war event that we have as a team. Since we onl
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!