From 5bc5ceae6028b9267fa4ff437f795ec6e5d69bfa Mon Sep 17 00:00:00 2001 From: kr820js Date: Sat, 23 Mar 2024 20:15:04 +0100 Subject: [PATCH] submition11 --- a1/program.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/a1/program.c b/a1/program.c index 4dec15e..1a3224c 100644 --- a/a1/program.c +++ b/a1/program.c @@ -136,8 +136,7 @@ int analizing_string(char* pointer){ number2 = round(number2 *100) / 100; result3 = round(result3 *100) / 100; - printf("number1 = %s, number2 = %s, result3 = %s\n", first_number, second_number, result_nubmer); - printf("number1 = %f, number2 = %f, result3 = %f\n", number1, number2, result3); + if(operant=='+' &&result3==number1+number2){ return 1; @@ -178,12 +177,4 @@ int copy_number(char number[], char *pointer, int i) { return i; } -/*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; -}*/