From 9260a40089717bd868512a0876d2b71236411818 Mon Sep 17 00:00:00 2001 From: kr820js Date: Sat, 23 Mar 2024 18:59:31 +0100 Subject: [PATCH] submition6 --- a1/program.c | 30 +++++------------------------- 1 file changed, 5 insertions(+), 25 deletions(-) diff --git a/a1/program.c b/a1/program.c index 712e79d..d626e26 100644 --- a/a1/program.c +++ b/a1/program.c @@ -84,20 +84,20 @@ int analizing_string(char* pointer){ char *first_number_cucumber=strtok(buffer_for_token, delim); - if(first_number_cucumber==NULL||is_number_question_mark(first_number_cucumber)==0){ + if(first_number_cucumber==NULL) {//||is_number_question_mark(first_number_cucumber)==0){ return -1; } char *second_number=strtok(NULL, delim); - if(second_number==NULL||is_number_question_mark(second_number)==0){ + if(second_number==NULL) { //||is_number_question_mark(second_number)==0){ return -1; } char *result=strtok(NULL, delim); - if(result==NULL||is_number_question_mark(result)==0){ + if(result==NULL) { //||is_number_question_mark(result)==0){ return -1; } @@ -127,31 +127,11 @@ int analizing_string(char* pointer){ } -int is_number_question_mark(char *pointer){ +/*int is_number_question_mark(char *pointer){ for(int i=0; pointer[i]!='\0'; i++){ if (!isdigit(pointer[i])&&pointer[i]!='.'&&pointer[i]!=',') { return 0; } } return 1; -} - - - - - - - - - - - - - - - - - - - - +}*/