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
string + null
IotaSeedGenerator
Ship! Wall
Approximate_exp_13112020
merge 2 sorted array
SQL import
Fórum ➡ Convert from one format into another using LINQ ( as much as possible ) ♦
Foreach
Lab8
rathit