using System;

namespace CakeRoll{
    public class cakeroll{
        private static Random RandomGen = new Random();
        public static int Rand(float percent){
            int rand = RandomGen.Next(100);
            if (rand <= percent){
                return 1;
            }else{
                return 0;
            }
        }
        public static float PercentOf(float value, float total){
            return (100.0f / total) * value;
        }
    }
}