This commit is contained in:
Andrii Hermaniuk 2022-03-18 14:56:13 +01:00
parent 811dc69e28
commit 50879eea8d

View File

@ -13,8 +13,13 @@ int main(){
if(ch==EOF||ch==' ')break; if(ch==EOF||ch==' ')break;
pol[idx]=ch; pol[idx]=ch;
} }
for(int i=0, p=0;i<strlen(pol);i++){ for(int i=0, p=1;i<strlen(pol);i++){
if() if(pol[i]=='\n')p++;
else if((po[i]<='9'&&po[i]>='0')||(pol[i]=='.')||(pol[i]==EOF)||(pol[i]==' '));
else {
printf("Nepodarilo sa nacitat polynom na %d mieste.\n", p);
return 0;
}
else if((pol[i]<='9'&&pol[i]>='0')||(pol[i]=='.')||(pol[i]==EOF)||(pol[i]==' ')); else if((pol[i]<='9'&&pol[i]>='0')||(pol[i]=='.')||(pol[i]==EOF)||(pol[i]==' '));
else { else {
printf("Nepodarilo sa nacitat polynom na 2 mieste.\n"); printf("Nepodarilo sa nacitat polynom na 2 mieste.\n");