Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
0% Quality Score
Upvotes Received
0
Posts with Upvotes
0
Upvoting Members
0
Downvotes Received
5
Posts with Downvotes
2
Downvoting Members
4
0 Endorsements
~2K People Reached
Favorite Forums
Favorite Tags
Member Avatar for harshchandra
Member Avatar for balajisankar

[CODE]#include<stdio.h> #include<conio.h> void main() {int a[10],i=0,c=0,n; printf("\n enter the gray code"); scanf("%d",&n); while(n!=0) {a[i]=n%10; n/=10; i++; c++; } for(i=c-1;i>=0;i--) { if(a[i]==1) { if(a[i-1]==1) a[i-1]=0; else a[i-1]=1; } } printf("\n the binary code is"); for(i=c-1;i>=0;i--) printf("%d",a[i]); getch(); }[/CODE] this is for converting binary code to gray code[CODE]#include<stdio.h> #include<conio.h> void main() {int …

Member Avatar for WaltP
-3
118