\documentclass[a4paper,oneside,11pt]{article}
\usepackage[left=2.5cm,right=2.5cm,top=4cm,bottom=2.7cm]{geometry}
\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{graphicx}
\usepackage{array}
\usepackage{newtxtext,newtxmath}
\usepackage{lipsum}
\usepackage{longtable}
\begin{document}
\theoremstyle{definition}
\newtheorem{theorem}{Theorem}[section]
\newtheorem{example}[theorem]{Example}
\lipsum[1-4]
\begin{example}
We present the examples of t-norm and t-conorm using a table as follows.
\begingroup
\renewcommand{\arraystretch}{1.5}
\begin{longtable}{|m{2.3cm}|c|c|}
\caption{Example of t-norm and t-conorm}
\hline
\hfill \textbf{Name}\hfill \strut&\textbf{t-norm}&\textbf{t-conorm}\\
\hline
Standard intersection/ standard union&$T_m(x,y)=\min(x,y)$&$C_m(x,y)=\max(x,y)$\\
\hline
Bounded sum&$T_b(x,y)=\max(0,x+y-1)$&$C_b(x,y)=\min(1,x+y)$\\
\hline
Algebraic product/ Algebraic sum&$T_p(x,y)=xy$&$C_p(x,y)=x+y-xy$\\
\hline
Drastic&$T_D(x,y)=
\begin{cases}
y&\text{if }x=1\\
x&\text{if }y=1\\
0&\text{otherwise}
\end{cases}$
&
$C_D(x,y)=
\begin{cases}
y&\text{if }x=0\\
x&\text{if }y=0\\
1&\text{otherwise}
\end{cases}
$
\\
\hline
Nilpotent minimum/ Nilpotent maximum&$T_{nM}(x,y)=
\begin{cases}
\min(x,y)&\text{if }x+y> 1\\
0&\text{otherwise}
\end{cases}$&
$
C_{nM}(x,y)=
\begin{cases}
\max(x,y)&\text{if }x+y<1\\
1&\text{otherwise}
\end{cases}
$
\\
\hline
Hamacher product/ Einstein sum&$T_{H_0}(x,y)=
\begin{cases}
0&\text{if }x=y=0\\
\dfrac{xy}{x+y-xy}&\text{otherwise}
\end{cases}$&
$
C_{H_2}(x,y)=\dfrac{x+y}{1+xy}
$\label{tabelnorma}
\\
\hline
\end{longtable}
\endgroup
\end{example}
\end{document}
I want to add caption in my table. I'm using longtable. But I don't know why that code gives me an error.
How to fix it?


caption{...}had to be table row terminator\\. – Zarko Nov 04 '20 at 04:08\\and it fixed. – Ongky Denny Wijaya Nov 04 '20 at 04:57