Computer Science, asked by YogitaDewangan, 4 months ago

solve the following accordingly 1) convert the decimal to binary a )
200​

Answers

Answered by challaharsha680
0

Answer:

i am using c programme to solve this problem

Explanation:

#include<stdio.h>    

#include<stdlib.h>  

int main(){  

int a[10],n,i;    

system ("cls");  

printf("Enter the number to convert: ");    

scanf("%d",&n);    

for(i=0;n>0;i++)    

{    

a[i]=n%2;    

n=n/2;    

}    

printf("\nBinary of Given Number is=");    

for(i=i-1;i>=0;i--)    

{    

printf("%d",a[i]);    

}    

return 0;  

}  

Similar questions