Showing posts with the label Array Programs(C)Show all

10)Write a program that converts any decimal integer number to binary, octal and hexadecimal equivalents using function that converts decimal number to any base equivalent.

source file name: Convallfn.C void main() { void conv(int n, int b); int n; clrscr(); printf("\n enteu any Natural  number :\n"); scanf("%d",&n); conv(n,2); conv(n,8); conv(n,16); getch(); } void conv(int n, int b) { int rem[15]; int i=0; while(n>0) { rem[i]=n%b; n=n/b; i++; } if(b==2) prin…

Read more