mirror of
https://codeberg.org/andyscott/exercism.git
synced 2024-11-09 13:20:48 -05:00
8 lines
146 B
Zig
8 lines
146 B
Zig
|
pub fn squareRoot(radicand: usize) usize {
|
||
|
var guess: usize = 1;
|
||
|
|
||
|
while (guess * guess < radicand) : (guess += 1) {}
|
||
|
|
||
|
return guess;
|
||
|
}
|