Skip to content

Instantly share code, notes, and snippets.

@codecademydev
Created March 27, 2020 18:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save codecademydev/9e0ee002bfc9d9ea9e991a0275d8f8be to your computer and use it in GitHub Desktop.
Save codecademydev/9e0ee002bfc9d9ea9e991a0275d8f8be to your computer and use it in GitHub Desktop.
Codecademy export
using System;
namespace BuiltInMethods
{
class Program
{
static void Main(string[] args)
{
string[] summerStrut;
summerStrut = new string[] { "Juice", "Missing U", "Raspberry Beret", "New York Groove", "Make Me Feel", "Rebel Rebel", "Despacito", "Los Angeles" };
int[] ratings = { 5, 4, 4, 3, 3, 5, 5, 4 };
int index = (Array.IndexOf(ratings, 3));
int position = index++;
int threeStars = Array.Find(ratings, three => three == 3);
Console.WriteLine($"Song number {index} is rated three stars");
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment