# Draw a Clock using tkz-euclide

I am trying to make a clock with the tkz-euclide package using a for loop. I have tried to get it to work but it keeps giving me errors. Here is my MWE

\documentclass[tikz]{standalone}
\usepackage{tkz-euclide}
%\usetikzlibrary{calc}
\begin{document}
\begin{tikzpicture}
\def \n{12}
\tkzDefPoint(0,0){O}
%  \tkzDefPoint(90-360/12:5){B}
%  \tkzDefPoint(90-360/12:4){C}
%  \tkzDrawSegment(B,C)
%  \tkzLabelPoint[below](C){1}
%  \tkzDrawPoint(B)
\foreach \i in {1,...,\n}
{
\tkzDrawPoint(t_\i)
}
\end{tikzpicture}
\end{document}


It seems to be having problems understanding the angle in the \tkzDefPoint command. Any suggestions?

The error you get is ! FP error: Illegal character c found in float number!.. The c in question is that in 5cm. Looks like you need a unitless number here, so remove cm from the definition of \n. You need to add it back in \tkzDrawCircle though.

And of course you want to multiply by \i not 1 in the loop.

\documentclass[tikz]{standalone}
\usepackage{tkz-euclide}
%\usetikzlibrary{calc}
\begin{document}
\begin{tikzpicture}
\def \n{12}
\tkzDefPoint(0,0){O}
%  \tkzDefPoint(90-360/12:5){B}
%  \tkzDefPoint(90-360/12:4){C}
%  \tkzDrawSegment(B,C)
%  \tkzLabelPoint[below](C){1}
%  \tkzDrawPoint(B)
\foreach \i in {1,...,\n}
{

• @1028 If you need parentheses in the calculation, for example if you have sin(x) or (a+b)/2, then you need braces as well. The reason is that when reading a coordinate (x,y), the parser typically looks for the closing parenthesis, so a parenthesis in one of the coordinates will mess things up. Aug 1 '16 at 19:30