Using titlesec as described on No newline after (sub)section? and especially http://www.latex-community.org/forum/viewtopic.php?f=5&t=10456 my proposal is:
\documentclass{article}
\usepackage{titlesec}
\titleformat{\section}
{\normalfont\bfseries\center}% formatting commands to apply to the whole section heading
{\thesection .}% the label and number
{0.5em}% space between label/number and section title
{}% formatting commands applied just to section title
[]% punctuation or other commands following section title
\titleformat{\subsection}[runin]% runin puts it in the same paragraph
{\normalfont\bfseries}% formatting commands to apply to the whole subsection heading
{\thesubsection .}% the label and number
{0.5em}% space between label/number and subsection title
{}% formatting commands applied just to subsection title
[.]% punctuation or other commands following subsection title
\begin{document}
\section{This is a section}
Some text following.
\subsection{This is a subsection}
Some more text following.
\end{document}
I hope that meets your requirements.
\documentclass{...}and ending with\end{document}. – May 26 '14 at 08:37amsartdocument class does everything you need. I.e.\documentclass{amsart}\begin{document}\section{Intro}etc.\end{document}. – Torbjørn T. May 26 '14 at 08:38Thanks
– user52443 May 26 '14 at 08:51