My cpu is at max on a simple program and it doesn't run

your program is asking a number and then if not zero it execute a loop forever causing the cpu also to saturate.
I some how think you wanted ti write your code like this instead:

x = int(input())
c = 0
while x != 0:
  b= x//10
  if b % 2 == 0 :
    c+=1
    print(c)
  x = int(input())

Where you ask the number again inside the loop.
When pasting code please use the reformatted text option.
And btw you need ti use a try/except to handle the case when you give a non numeral as input …

3 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.