[ create a new paste ] login | about

Link: http://codepad.org/zuOnqKUy    [ raw code | output | fork ]

C, pasted on Aug 28:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#include <stdio.h>
#include<string.h>

int main(void) {
	
	int a[500],i=0, n=0;
	
	printf("\tPROGRAMA PARA CONVERTIR DE BINARIO A ENTERO\n");
	printf("Introduzca el numero en binario\n");
	scanf("%d", &a[i]);
	
	while(i<=a[i]){
		
		n=((n * 2) + a[i]);
		
	}
	
	printf("El numero entero es %d\n", n);
	
	return 0;
}


Output:
1
Timeout


Create a new paste based on this one


Comments: