//Converter
//Thursday 25 2010 7:16pm
#include <stdio.h>
#include <stdlib.h>
int main ()
{
int i;
char buffer [33];
printf ("Enter a number: ");
scanf ("%d",&i);
itoa (i,buffer,10);
printf ("decimal: %s\n",buffer);
itoa (i,buffer,2);
printf ("binary: %s\n",buffer);
system("pause");
return 0;
}
Pugee 0 Newbie Poster
Nick Evan 4,005 Industrious Poster Team Colleague Featured Poster
VernonDozier 2,218 Posting Expert Featured Poster
WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.