From d22033a5722169202cc8e40cfd819c471fb733af Mon Sep 17 00:00:00 2001 From: Anup Kumar Panwar Date: Wed, 27 Jul 2016 15:49:38 +0530 Subject: [PATCH] Moved to C --- binarytodecimal.cpp | 17 ----------------- 1 file changed, 17 deletions(-) delete mode 100644 binarytodecimal.cpp diff --git a/binarytodecimal.cpp b/binarytodecimal.cpp deleted file mode 100644 index 6444eaa6b..000000000 --- a/binarytodecimal.cpp +++ /dev/null @@ -1,17 +0,0 @@ -#include -#include -int main(){ - int number,decimal_number,temp=1; -printf("Enter any binary number= "); -scanf("%d",&number); - int remainder; - while(number>0){ - - remainder= number%10; - number=number/10; - decimal_number+=remainder*temp; - temp=temp*2;//used as power of 2 - - } - printf("%d",decimal_number); -}