\documentclass{article}

\usepackage{color}
\usepackage{minted}

\usepackage{xepersian}

\settextfont{Yas}

\begin{document}

\begin{tabular}{rp{0.5\textwidth}}
hi
&
\begin{minted}[formatcom=\setLTR]{c}
// this is a hello world program in C.
int main() {
  printf("hello, world");
  return 0;
}
\end{minted}
\\
\end{tabular}

\begin{LTR}
\begin{minted}{python}
# this is a hello world program in python.
print ("hello worlds!")
\end{minted}
\end{LTR}

\end{document}
