This commit is contained in:
Matus Tokarcik 2024-03-28 19:51:36 +01:00
parent 70e3f2cba3
commit 4c107bbe23
2 changed files with 3 additions and 3 deletions

View File

@ -15,13 +15,13 @@ int main(){
char* token; char* token;
token = strtok(pole, " "); //rozdelenie retazca podla medzier token = strtok(pole, " "); //rozdelenie retazca podla medzier
cislo1 = atoi(token); // premena stringu na cislo a priradenie cislu1 cislo1 = atof(token); // premena stringu na desatinne cislo a priradenie cislu1
token = strtok(NULL, " "); //pokracovanie v rozdelovani retazca token = strtok(NULL, " "); //pokracovanie v rozdelovani retazca
znamienko = token[0]; // vrati ukazatel na nasledujuci token, cize znamienko znamienko = token[0]; // vrati ukazatel na nasledujuci token, cize znamienko
token = strtok(NULL, " =\n"); token = strtok(NULL, " =\n");
cislo2 = atoi(token); cislo2 = atof(token);
token = strtok(NULL, " =\n"); token = strtok(NULL, " =\n");
vysledok = atoi(token); vysledok = atof(token);
double realny; double realny;

Binary file not shown.