Support our Blind Hand Charity by donating at 9818291723. Your contribution has the potential to bring about significant positive change for humanity.

Search This Blog

Thursday, May 11, 2023

NATURE OF NUMBER

n=1
y=0
x=0
while n!=0:
    n=int(input("Enter the number and 0 to exit = "))
    if n==0:
        break
    elif n==abs(n):
        x+=1
    elif n!=abs(n):
        y+=1
print("\n","Number of positive numbers =",x,"\n","Number of zero digits =",1,"\n","Number of negative numbers =",y)

OUTPUT