i want to know how to use the foreach loop for adding arcs using commands \path and edge. For instance, the following code generates a cycle and the task is to add the arcs not manually:
\documentclass[border=2pt,tikz]{standalone}
\usepackage{wasysym}
\usetikzlibrary{decorations.pathreplacing,automata,arrows,shadows,patterns,shapes}
\begin{document}
\newlength{\rnodo}
\newlength{\radio}
\setlength{\rnodo}{10pt}
\setlength{\radio}{3.00cm}
\tikzstyle{nondirected}=[thick]
\tikzstyle{labels}=[inner sep=0pt,font=\scriptsize,auto,circle]
\tikzstyle{main node}=[outer sep=1,inner sep=0,ellipse,thick,draw,minimum size=2\rnodo,fill=black!10]
\newcommand\n{10}
\begin{tikzpicture}
\foreach \x in {1,...,\n}{
\coordinate (cn\x) at ({(1+2*\x)*180/\n-90}:\radio);
\node (n\x) at (cn\x) {$n_{\x}$};
}
\path[nondirected]
(n1) edge node[labels] {$\oplus$} (n2)
(n2) edge node[labels] {$\oplus$} (n3)
(n3) edge node[labels] {$\ominus$} (n4)
(n4) edge node[labels] {$\ocircle$} (n5)
(n5) edge node[labels] {$\ocircle$} (n6)
(n6) edge node[labels] {$\oplus$} (n7)
(n7) edge node[labels] {$\oplus$} (n8)
(n8) edge node[labels] {$\ominus$} (n9)
(n9) edge node[labels] {$\ominus$} (n10)
(n10) edge node[labels] {$\ocircle$} (n1);
\end{tikzpicture}
\end{document}
In this LINK, I've been given some alternatives using command \draw. I've tried to adapt it, but with no luck so far.