#include #include #include #include #include struct uloha{ float result; char Output[25]; }; char* ClearString(const char* str) { const char* separator = " "; // Declare separator as const pointer char* novy_string = malloc(strlen(str) + 1); // Allocate memory for new string if (novy_string == NULL) { return NULL; } novy_string[0] = '\0'; // Initialize the new string char* token; char* kopie_str = strdup(str); // Make a copy of the original string if (kopie_str == NULL) { free(novy_string); // Free memory allocated for new string return NULL; } // Get the first token token = strtok(kopie_str, separator); // Iterate through the remaining tokens while (token != NULL) { strcat(novy_string, token); // Append token to the new string token = strtok(NULL, separator); // Get the next token } free(kopie_str); // Free the copied string as it's no longer needed return novy_string; } int main(){ char pole[100]; memset(pole,0,100); char CistePole[100]; float cislo1; float cislo2; char znamienko; char* token; int priklad = 0; int chyba = 0; struct uloha excel[100]; while (1) { char* a = fgets(pole, 100, stdin); if (pole[0] == '\n' || a == NULL ) { break; } //CHECK for(int i = 0; i