DEV Community

Discussion on: Daily Challenge #64- Drying Potatoes

Collapse
 
cosminpopescu14 profile image
Cosmin Popescu • Edited

let potatoes = (p0, w0, p1) => parseInt(w0 * (100 - p0) / (100 - p1))

console.log(potatoes(99, 100, 98));
console.log(potatoes(50, 200, 25));

Collapse
 
cosminpopescu14 profile image
Cosmin Popescu

in C#

int potatoes(int p0, int w0, int p1) => w0 * (100 - p0) / (100 - p1);
Console.WriteLine(potatoes(50, 200, 25));