size_t %d -> %zd
Switch placement to use scanf().