Aktualizovat du3/program.c
This commit is contained in:
parent
4a8f4f0277
commit
e0873bf98d
@ -58,6 +58,11 @@ int main()
|
|||||||
|
|
||||||
while (fgets(line, SIZE, stdin) != NULL)
|
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)
|
if (sscanf(line, "%127[^\n]", strBuffer) == 1)
|
||||||
{
|
{
|
||||||
bool isLineInvalid = false;
|
bool isLineInvalid = false;
|
||||||
@ -74,7 +79,6 @@ int main()
|
|||||||
for (int i = 0; strBuffer[i] != '\0'; i++)
|
for (int i = 0; strBuffer[i] != '\0'; i++)
|
||||||
{
|
{
|
||||||
bool isNegativeSign = false;
|
bool isNegativeSign = false;
|
||||||
|
|
||||||
if (isspace(strBuffer[i]) != 0)
|
if (isspace(strBuffer[i]) != 0)
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user