using System; class Program { static void Main() { var r = new Random(); int[] a = new int[3]; for (int i = 0; i < 3; i++) { int e = 1; bool t = true; while (e != 0 && t){ e = r.Next(1, 11); for (int j = 0; j < 3; j++) if (e == a[j]) { t = true; break; } else t = false; } a[i] = e; Console.Write(a[i] + " "); } Console.WriteLine(); int[] m = new int[10]; int b = 0;
for (int i = 0; i < 10; i++) { while (b % a[0] != 0 || b % a[1] != 0 || b % a[2] != 0) b++; m[i] = b; b++; Console.Write(m[i]+" "); } Console.Read(); } }
using System;
class Program {
static void Main() {
var r = new Random();
int[] a = new int[3];
for (int i = 0; i < 3; i++) {
int e = 1; bool t = true;
while (e != 0 && t){
e = r.Next(1, 11);
for (int j = 0; j < 3; j++)
if (e == a[j]) { t = true; break; } else t = false;
}
a[i] = e;
Console.Write(a[i] + " ");
}
Console.WriteLine();
int[] m = new int[10]; int b = 0;
for (int i = 0; i < 10; i++) {
while (b % a[0] != 0 || b % a[1] != 0 || b % a[2] != 0) b++;
m[i] = b;
b++;
Console.Write(m[i]+" ");
}
Console.Read();
}
}