Algorithme.
TD : Algorithme.. Recherche parmi 300 000+ dissertationsPar Deschamps Hugo • 14 Décembre 2016 • TD • 1 537 Mots (7 Pages) • 756 Vues
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApplication68
{
class Program
{
public class drapeauHollandais
{
private int n;
private char[] t = new char[15];
public drapeauHollandais(int n)
{
int i;
i = 0;
int has=0;
Console.WriteLine("Les boules random :");
//t = new char[n];
Random randNum = new Random();
while (i<15)
{
has = randNum.Next(3);
if (has == 0)
{
t[i] = 'B';
}
else if (has == 1)
{
t[i] = 'W';
}
else
{
t[i] = 'R';
}
i++;
}
}
public void afficher()
{
int i;
i = 0;
while (i<15)
{
Console.WriteLine(t[i]);
i++;
}
}
public void reordonne()
{
...