Im having trouble with my binary to decimal program. I have whats below already, although there are no errors it still is probably wrong, a little backstory is im trying to write a program that takes binary values from a file which includes some binary values with a letter in it or a space to make it incorrect meaning we have to output "bad digit on input" and whenever i run it, it only outputs "Binary number Decimal Equivalent" and nothing else. Not sure what im doing wrong. The file is this:
1
_10
11
___10000
10 1100
10101
11001g011
101110111
k0011011
00011