The integer square root of a natural number is a natural number such that but . For instance, the integer square root of 100 is 10, and it is also of 120.
Write a program that reads natural numbers and prints their integer square roots. Your program must include the function
int root (int x);
that returns the integer square root of a natural number .
Input is a sequence of natural numbers.
For each number of the output, print in a line and separated by a space, and its root.
Author: Unknown
Translator: Carlos Molina
Generation: 2026-01-25T11:17:18.222Z
© Jutge.org, 2006–2026.
https://jutge.org