formatting source-code for d7af6fdc8c

This commit is contained in:
github-actions
2020-05-29 23:26:30 +00:00
parent edb3d51ec2
commit 7ad1f171c1
176 changed files with 5342 additions and 4288 deletions

View File

@@ -8,7 +8,8 @@
/** Function to read the number from stdin. The function reads input until a non
* numeric character is entered.
*/
void fastinput(int *number) {
void fastinput(int *number)
{
// variable to indicate sign of input integer
bool negative = false;
register int c;
@@ -16,7 +17,8 @@ void fastinput(int *number) {
// extract current character from buffer
c = std::getchar();
if (c == '-') {
if (c == '-')
{
// number is negative
negative = true;
@@ -31,11 +33,13 @@ void fastinput(int *number) {
// if scanned input has a negative sign, negate the
// value of the input number
if (negative) *(number) *= -1;
if (negative)
*(number) *= -1;
}
/** Main function */
int main() {
int main()
{
int number;
fastinput(&number);
std::cout << number << std::endl;