Skip to content

Commit

Permalink
Merge pull request #1160 from arvind0598/patch-1
Browse files Browse the repository at this point in the history
Updated C# sample code for a simpler game.
  • Loading branch information
alexdima committed Nov 9, 2018
2 parents db8a6cb + 2000b63 commit 9e08d44
Showing 1 changed file with 25 additions and 10 deletions.
35 changes: 25 additions & 10 deletions test/samples/sample.csharp.txt
Original file line number Diff line number Diff line change
@@ -1,23 +1,38 @@
/*
* C# Program to Display All the Prime Numbers Between 1 to 100
*/

using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace VS
{
class Program
{
static void Main(string[] args)
{
ProcessStartInfo si = new ProcessStartInfo();
float load= 3.2e02f;

si.FileName = @"tools\\node.exe";
si.Arguments = "tools\\simpleserver.js";

Process.Start(si);
{
bool isPrime = true;
Console.WriteLine("Prime Numbers : ");
for (int i = 2; i <= 100; i++)
{
for (int j = 2; j <= 100; j++)
{
if (i != j && i % j == 0)
{
isPrime = false;
break;
}
}

if (isPrime)
{
Console.Write("\t" +i);
}
isPrime = true;
}
Console.ReadKey();
}
}
}

0 comments on commit 9e08d44

Please sign in to comment.