2. Write a c program to convert decimal number to octal number.
3. Write a c program to convert decimal number to hexadecimal number.
4. Write a c program to convert octal number to binary number.
3. Write a c program to convert decimal number to hexadecimal number.
4. Write a c program to convert octal number to binary number.
6. Write a c program to convert octal number to hexadecimal number.
8. Write a c program to convert hexadecimal number to octal number.
9. Write a c program to convert hexadecimal number to decimal number.
10. Write a c program to convert binary number to octal number.
9. Write a c program to convert hexadecimal number to decimal number.
10. Write a c program to convert binary number to octal number.
12. Write a c program to convert binary number to hexadecimal number.
13. C program for addition of binary numbers .
14. C program for multiplication of two binary numbers.
15. C program fractional binary conversion from decimal.
16. C program for fractional decimal to binary fraction conversion.
17. C program to convert decimal number to roman.
18. C program to convert roman number to decimal number.
19. C program to convert each digits of a number in words
20. C program to convert currency or number in word.
13. C program for addition of binary numbers .
14. C program for multiplication of two binary numbers.
15. C program fractional binary conversion from decimal.
16. C program for fractional decimal to binary fraction conversion.
17. C program to convert decimal number to roman.
18. C program to convert roman number to decimal number.
19. C program to convert each digits of a number in words
20. C program to convert currency or number in word.
17 comments:
please write the program for follwing
if u enter number between 2 to 9 it will display like
5=1,1,1,1,1
5=1,1,1,2
5=1,1,3
5=1,4
5=2,1,1,1
5=2,2,1
5=3,1,1
5=4,1
hey..can someone help me?
I need to create a program that will convert binary to decimal,octal, and hexadecimal.
ex.
enter binary number:
output:
decimal=
octal=
hexadecimal=
hey the above program will not give the currect hexa decimal output.....
Question, where do you get that 48 and 55 from?
while(quotient!=0){
temp = quotient % 16;
//To convert integer into character
if( temp < 10)
temp =temp + 48;
else
temp = temp + 55;
hexadecimalNumber[i++]= temp;
quotient = quotient / 16;
}
What the hell are you doing man.
USE SCANF("%d",&n);
printf("%x",n);
that 's it stupid
temp =temp + 48; (this is used for converting the digits from 0 to 9 to its ASCII value)
i.e.
ASCII value of the digit = the value of the digit + ASCII value of 0(zero)
temp = temp + 55; (this is used for converting the digits from A(10) to F(15) to its ASCII value) i.e.
ASCII value of the digit = the value of the digit-10 + ASCII value of 'A'.
Here -10 is done to correct the ASCII to the corresponding digit.
It's an exercise buddy, relax
Write a c program to convert hexadecimal number to decimal number. please send this programming
ascII value of A is 65,so 55 should be replaced by 65
only change base any system convet u
#include
#include
using namespace std;
int main()
{
int deci=900,hex=0,rem,i=1;
while(deci>0)
{
rem=deci%16;
deci=deci/16;
hex=hex+(i*rem);
i=i*10;
}
cout<<hex;
getch ();
return 0;
}
The easy way is easy hhhhhhh
Thank u alot
void To(long long num,char *buff,int base)
{
if(buff==NULL) return;
long long m=0,no=num,i=1;
while((no/=base)>0) i++;
buff[i]='\0';
no=num;
while(no>0)
{
m=no%base;
no=no/base;
buff[--i]=(m>9)?((base==16)?('A' + m - 10):m):m+48;
}
}
That's exactly what it does
Write a program in c ++ hundred decimal and display the total result.
thanks, nice post
Enter number x.print 1 to 100 and what number between the range devide by x to get integer.
Enter number x.print 1 to 100 and what number between the range devide by x to get integer.
Post a Comment