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
Why is c called c?
Can an array be an Ivalue?
What is clrscr ()?
What is a program flowchart and how does it help in writing a program?
Why c is faster than c++?
Function which gives a pointer to a binary trees const an integer value at each code, return function of all the nodes in binary tree.?
What are pointers really good for, anyway?
Write a C program to accept a matrix of any size. Find the frequency count of each element in the matrix and positions in which they appear in the matrix
What could possibly be the problem if a valid function name such as tolower() is being reported by the C compiler as undefined?
Write a program to reverse a string.
what value is returned to operating system after program execution?
When would you use a pointer to a function?
How to declare pointer variables?
Sir i need notes for structure,functions,pointers in c language can you help me please
Why is structure important for a child?