Skip to content

Instantly share code, notes, and snippets.

View jnewton00's full-sized avatar
🎯
Focusing

John Newton jnewton00

🎯
Focusing
  • Staffordshire
View GitHub Profile
@jnewton00
jnewton00 / gist:8f03475c4c794c40e1314bf7c30680b9
Created October 4, 2021 14:44
You probably know the "like" system from Facebook and other pages. People can "like" blog posts, pictures or other items. We want to create the text that should be displayed next to such an item. Implement the function which takes an array containing the names of people that like an item. It must return the display text as shown in the examples:
//[] --> "no one likes this"
//["Peter"] --> "Peter likes this"
//["Jacob", "Alex"] --> "Jacob and Alex like this"
//["Max", "John", "Mark"] --> "Max, John and Mark like this"
//["Alex", "Jacob", "Mark", "Max"] --> "Alex, Jacob and 2 others like this"
using System;
using System.Collections.Generic;
using System.Linq;
using System;
namespace FibonacciTest
{
class Program
{
static void Main(string[] args)
{
var Fibonacci1 = new getFibonacci("Fibonacci");
System.Console.WriteLine(Fibonacci1.Name);