Demo entry 6355488

int

   

Submitted by anonymous on Apr 13, 2017 at 23:41
Language: C#. Code size: 607 Bytes.

int b = 1;
float c = 2.3456789f;
double d = 10.9876543210987654;
decimal e = 60.1234567890123456789012345678m;
bool f = true;
string name = "Tom";

int score = 5;
if (score == 5) {
  Console.WriteLine("Your score is 5.");
}

for (int i = 1; i <= 8; i++)
{
  Console.WriteLine("i is " + i);
}

var t = 10;
while (t < 20) 
{
  Console.WriteLine("t is " + t);
  t++;
}

static double cube (double number) {
  return Math.Pow(number, 3);
}
public static void Main (string[] args) {
  Console.WriteLine(cube(5));
}

Console.WriteLine(Math.Sin(Math.PI * 90 / 180));

using System;

This snippet took 0.01 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).