Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Reward
//Rextester.Program.Main is the entry point for your code. Don't change it. //Microsoft (R) Visual C# Compiler version 2.9.0.63208 (958f2354) using System; using System.Collections.Generic; using System.Linq; using System.Text.RegularExpressions; namespace Rextester { public class Program { public static void Main(string[] args) { int itemCount = 10; int playerCount = 3; float percentReward = 0.5f; for (int i = playerCount; i > 0; i--) { if (i == 1){ Console.WriteLine(itemCount); } else { int playerReward = (int)Math.Ceiling((double)itemCount * percentReward ); Console.WriteLine(playerReward); itemCount -= playerReward; } } } } }
run
|
edit
|
history
|
help
0
Multidimensional Arrays
Enemy Spawner
dcsdasxsdcdf
Reverse words in string
Intuit // C# // listing_4.1 (Console.WriteLine _ Форматный вывод)
StopJoin.cs
Random number + IF var change2
AlphabeticalRank
sdfrgyhjuiku7y6t5rf
gd