Non-decimal radices/Output: Difference between revisions

Content deleted Content added
→‎{{header|Python}}: Scrolled region
added c++
Line 13:
 
for(i=1; i <= 33; i++)
printf("%6d %6x %6o\n", i, i, i);
 
return 0;
}</lang>
 
Binary conversion using <tt>%b</tt> is not standard.
 
=={{header|C++}}==
 
<lang cpp>#include <iostream>
#include <iomanip>
 
int main()
{
for (int i = 0; i <= 33; i++)
std::cout << std::setw(6) << std::dec << i << " "
<< std::setw(6) << std::hex << i << " "
<< std::setw(6) << std::oct << i << std::endl;
 
return 0;
}</lang>
 
Binary conversion is not standard.
 
=={{header|Fortran}}==