If we can’t know how many numbers we need to calculate in advance.
we may use this: ******while(std::cin>>value) //if you input in CMD
it checks the space ******std::cin
It will keep counting until the value does not belong to the integer.
but if the number is floating it will treat as integer, plus it, then finished, didn’t count the rest of the value, although is an integer.