I want to make this program check if ch is all capital and got no space but I have a problem in ver if i type all capital it starts to add multiple numbers or idk
#include<stdio.h>
#include<string.h>
void main(){
    char ch[200];
    int i=0,ver=0;
    do {
        printf("Donner un chaine : ");  
        gets(ch);
        int x=strlen(ch)-1;
        do{
            printf("ch[x]=%c\t",ch[x]);
            printf("x=%d\t",x);
            printf("ver=%d\n",ver);         
            if (ch[x]==' '){
                x-=1;
                ver+=1;
            }
            else if('a'<=ch[x]<='z'){
                x-=1;
                ver+=1;
            }
            else{
                ver+=0;
            }
        }while(x>-1);   
    }while(ver>0);
}
 
     
    