Step 1: Use the max-plus-min identity.
For any two numbers, $\max\{a,b\}+\min\{a,b\}=a+b$. With $a=\sin x$ and $b=\cos x$, we get $f(x)+g(x)=\sin x+\cos x$.
Step 2: Combine the two integrals.
Therefore $\int_0^{\pi} f\,dx+\int_0^{\pi} g\,dx=\int_0^{\pi}\big(f(x)+g(x)\big)\,dx=\int_0^{\pi}(\sin x+\cos x)\,dx$.
Step 3: Integrate $\sin x$.
$\int_0^{\pi}\sin x\,dx=\big[-\cos x\big]_0^{\pi}=-\cos\pi+\cos 0=1+1=2$.
Step 4: Integrate $\cos x$.
$\int_0^{\pi}\cos x\,dx=\big[\sin x\big]_0^{\pi}=\sin\pi-\sin 0=0$.
Step 5: Add the parts.
The total is $2+0=2$.
Step 6: Conclude.
Hence the required sum of integrals equals $2$, matching the key. \[ \boxed{2} \]