Information for teachers 0 of 2 activities solved
  1. About Time2Code Not yet read
  2. Getting Started with Time2Code on Dodona Not yet solved
Next series Level 1 - Inputs, outputs and structure
Information for teachers

Getting Started with Time2Code on Dodona

Sign in to hand in your solution and get feedback.

using System; class Submission { static Random rng = new Random(); public static string FlipCoin() { // Generate outcome of flipping an unbiased coin return rng.Next(2) == 0 ? "heads" : "tails"; } public static void Main(string[] args) { Console.WriteLine(FlipCoin()); } }