#include<stdio.h>
#include<coio.h>
//function definition ''binary'
void binary(int n)
{
int r;
r=n%2;
n=n/2;
if(n==0)
printf("%d",r);
else
{
binary(n);
printf("%d",r);
}
}
void main()
{
int n;
printf("Enter a decimal number");
scanf("%d",&n);
binary(n);
getch();
}
#include<coio.h>
//function definition ''binary'
void binary(int n)
{
int r;
r=n%2;
n=n/2;
if(n==0)
printf("%d",r);
else
{
binary(n);
printf("%d",r);
}
}
void main()
{
int n;
printf("Enter a decimal number");
scanf("%d",&n);
binary(n);
getch();
}
5 Comments
,👌👌👍
ReplyDeleteEk no sir
ReplyDeleteGood one
ReplyDeleteExvellENT
ReplyDeleteThanks sir
ReplyDelete