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 data structure in c and its types?
How are structure passing and returning implemented?
Where static variables are stored in memory in c?
What is the scope of static variable in c?
What is table lookup in c?
What is an endless loop?
What is "Duff's Device"?
What is echo in c programming?
Can you think of a logic behind the game minesweeper.
What are header files in c programming?
if the area was hit by a virus and so the decrease in the population because of death was x/3 and the migration from other places increased a population by 2x then annually it had so many ppl. find our the population in the starting.
write a C program: To recognize date of any format even formats like "feb-02-2003","02-february-2003",mm/dd/yy, dd/mm/yy and display it as mm/dd/yy.
What is wrong with this declaration?
what do you mean by inline function in C?
What does volatile do?