Answer Posted / kamalb008
#include<stdio.h>
main()
{
int a,i,b,n;/*i have taken arbitary base u can enter the
base what ever u need*/
printf("enter the number and the base u want to conv resp");
scanf("%d%d",&a,&n);
i=1;
while(i<=20)
{
if(a<n)
break;
b=a%n;
a=a/n;
printf("\nLSB%d of the converted number is %d",i,b);
i++;
}
printf("\nMSB of the conv is %d",a);
}
| Is This Answer Correct ? | 1 Yes | 1 No |
Post New Answer View All Answers
What is a static function in c?
How to write c functions that modify head pointer of a linked list?
we need to calculating INCOME TAX for the person. The INCOME TAX is as follows:- First $10000/- of income : 4% tax Next $10000/- of income : 8% tax Next $10000/- of income : 11.5% tax above $10, 00,00/- : 15% tax What is the Solution of this Question ?
Why dont c comments nest?
What is c programing language?
write an algorithm to display a square matrix.
Why is c not oop?
Why main is used in c?
Explain two-dimensional array.
Is c++ based on c?
explain what is fifo?
What is auto keyword in c?
Is c object oriented?
Explain what is the concatenation operator?
What is hashing in c language?