Aktualizovat du3/program.c

This commit is contained in:
Tomáš Vlček 2026-03-19 21:06:37 +00:00
parent 4a8f4f0277
commit e0873bf98d

View File

@ -58,6 +58,11 @@ int main()
while (fgets(line, SIZE, stdin) != NULL)
{
//ak nacitany input JE nespravny...
if (line[0] != '\0' || line[0] != '\n')
{
break;
}
if (sscanf(line, "%127[^\n]", strBuffer) == 1)
{
bool isLineInvalid = false;
@ -74,7 +79,6 @@ int main()
for (int i = 0; strBuffer[i] != '\0'; i++)
{
bool isNegativeSign = false;
if (isspace(strBuffer[i]) != 0)
{
continue;