Take input of two data without using space or enter
<p>In C it is very simple <code>scanf("%d : %d",&amp;a,&amp;b)</code> say input <strong>5:10</strong> . So here a=5 and b=10. (:)Just split them into two as a separate integer. How can we do in C++
without using space or enter between two input </p>

<pre><code>int a,b;
cin&gt;&gt;a&gt;&gt;b; // how we take input two integer taking as 5:10
cout&lt;&lt;a&lt;&lt;b; // a=5 and b=10
</code></pre>