i am trying to create a program that will convert binary to decimal, i have got so far:
but i keep getting errors and i dont know why, any help would be appreciated.Code:#include <stdio.h> main(void) { int num1, num2 = 0; printf("Please enter a value between 0-255: "); scanf("%d",&num2); for (num1=128;num1>0;num1=num1/2); (num1=64;num1>0;num1=num1/2); (num1=32;num1>0;num1=num1/2); (num1=16;num1>0;num1=num1/2); (num1=8;num1>0;num1=num1/2); (num1=4;num1>0;num1=num1/2); (num1=2;num1>0;num1=num1/2); (num1=1;num1>0;num1=num1/2); printf("%d",num1/1); num1 = num1 &1; }