using System;
class Program {
	static void Main(string[] args)	{
		// Bloodline names
		string[] bloodlineNames = { "Human", "Elf", "Dwarf", "Dragonborn", "Tiefling" };
		// Generate bloodlines for two parents
		string parent1 = GenerateRandomBloodline(bloodlineNames);
		string parent2 = GenerateRandomBloodline(bloodlineNames);
		// Display Parent bloodlines
		Console.WriteLine($"Parent1{parent1}");
		Console.WriteLine($"Parent2{parent2}");
		// Generate offspring bloodline based on parents
		string offspring = GenerateOffspringBloodline(parent1, parent2);
		// Display offspring bloodline
		Console.WriteLine($"Offspring{offspring}");
	}
	static string GenerateRandomBloodline(string[] bloodlineNames) {
		// Generate random percentages
		Random random = new Random();
		double[] percentages = new double[bloodlineNames.Length];
		double total = 0;
		// Randomly generate percentages and keep a total of 100%
		for (int i = 0; i < percentages.Length - 1; i++) {
			percentages[i] = random.Next(0, 101 - (int)total);
			total += percentages[i];
		}
		// Ensure total is 100%
		percentages[percentages.Length - 1] = 100 - total;
		// Create result format
		return FormatBloodline(percentages);
    }
	static string FormatBloodline(double[] percentages) {
		int[] bloodlineCodes = { 1, 2, 3, 4, 5 };
		string result = "[";
		for (int i = 0; i < percentages.Length; i++) {
			result += $"{bloodlineCodes[i]},{(int)percentages[i]},";
		}
		// Remove last comma and close the bracket
		result = result.TrimEnd(',') + "]";
		return result;
	}
	static string GenerateOffspringBloodline(string parent1, string parent2) {
		// Parse bloodline percentages for both parents
		double[] parent1Percentages = ParseBloodline(parent1);
		double[] parent2Percentages = ParseBloodline(parent2);
		double[] offspringPercentages = new double[parent1Percentages.Length];
		Random random = new Random();
		double chanceForAtavism = random.NextDouble();
		// 5% chance for atavism
		const double atavismProbability = 0.05;
		// Mixing parent's bloodline
		for (int i = 0; i < offspringPercentages.Length; i++) {
			// Basic genetic mixing (50% from each parent)
			offspringPercentages[i] = (parent1Percentages[i] * 0.5) + (parent2Percentages[i] * 0.5);
			// Random chance for atavism
			if (chanceForAtavism < atavismProbability) {
				// Introduce a small random bloodline percentage
				// Random adjustment between -15 to +15
				offspringPercentages[i] += random.Next(-15, 16);
			}
		}
		// Normalize to ensure total equals to 100%
		Normalize(offspringPercentages);
		return FormatBloodline(offspringPercentages);
	}
	static double[] ParseBloodline(string bloodline) {
		string[] components = bloodline.Trim(new char[] { '[', ']' }).Split(',');
		double[] percentages = new double[components.Length / 2];
		for (int i = 1; i < components.Length; i += 2) {
			percentages[i / 2] = double.Parse(components[i]);
		}
		return percentages;
	}
	static void Normalize(double[] percentages) {
		double total = 0;
		foreach (var percentage in percentages) {
			total += percentage;
		}
		for (int i = 0; i < percentages.Length; i++) {
			// Ensure percentages stay non-negative
			percentages[i] = Math.Max(0, Math.Round((percentages[i] / total) * 100));
		}
	}
}
RROR!
/tmp/KcWBIQWJdi/main.c:1:1: error: unknown type name 'using'
    1 | using System;
      | ^~~~~
ERROR!
/tmp/KcWBIQWJdi/main.c:2:1: error: unknown type name 'class'
    2 | class Program {
      | ^~~~~
/tmp/KcWBIQWJdi/main.c:2:15: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
    2 | class Program {
      |              
What's wrong?