Main Menu

HOME

.Net
ASP
Assembly
C
C++
Delphi
HTML
Java
JavaScript
MySQL
PC interface
Powershell
Perl
PHP
VBScript
Visual Basic
XML

US Job listings




   Misc

   Amazon

   Links

    


octal or hexadecimal format
 

 

 

Description

This shows how to display integers formatted as octal or hexadecimal .

Code

/*displays octal , hexadecimal numbers*/
#include <stdio.h>

int main()
{
int i;
for(i=1;i<=16;i++)
{
printf("%o ",i); /*octal representation*/
printf("%x ",i); /*hexadecimal representation*/
printf("%X ",i); /*uppercase hexadecimal*/
printf("\n");
}
return 0;
}

Information

tested with Visual C++ 6 , LCC Win 32

 

 

 

 

Download

cocthex.txt


 




   Sponsors
 

   Software
500 Java Tips E-book
PHP editor
PERL editor
Beginning Java
Beginning Visual Basic
Learn VB.net
Learn VB 6
VB and databases
ASP image library
C++ builder programming
C++ fundamentals

   Source Code
move a directory(C Sharp)
Convert to Hex / Octal value(ASP)
Image resizer(PHP)
Display rows from only a certain category of a MySQL database(PHP)
Preload images(Javascript)
close any app(VB)
create a database(PHP)
multi messages in the status bar(Javascript)

    




Copyright © 2003 by programmershelp.co.uk