Skip to content

Update Factorial.c#1

Open
gregbo wants to merge 15 commits into
codefinite-vri:masterfrom
gregbo:patch-1
Open

Update Factorial.c#1
gregbo wants to merge 15 commits into
codefinite-vri:masterfrom
gregbo:patch-1

Conversation

@gregbo

@gregbo gregbo commented Apr 4, 2021

Copy link
Copy Markdown
  • Declared int main() to suppress compiler warning
  • Refactored main() so check for negative input needs to be made only once
  • Updated comment to indicate the program uses an iterative method

@gregbo

gregbo commented Apr 5, 2021

Copy link
Copy Markdown
Author

Recreated Sort Bubble.c with the following changes:

  • Declared int main() to suppress compiler warning
  • Added bounds checking on input array

No need to merge the deletes and adds between 12e16bb and dcdffb2

@gregbo

gregbo commented Apr 5, 2021

Copy link
Copy Markdown
Author
  • Declared int main() to suppress compiler warning
  • Added check for input to be a positive integer

@gregbo

gregbo commented Apr 7, 2021

Copy link
Copy Markdown
Author
  • Declared int main() to suppress compiler warning
  • Determined array size of initial call to sumEven() at runtime

@gregbo

gregbo commented Apr 8, 2021

Copy link
Copy Markdown
Author

Refactored to use an array of const char* instead of individual case statements for ease in maintainability

@gregbo

gregbo commented Apr 8, 2021

Copy link
Copy Markdown
Author

s/nums/words

@gregbo

gregbo commented Apr 18, 2021

Copy link
Copy Markdown
Author
  • Declared int main() to suppress compiler warning
  • Added code to handle input reaching EOF before a newline

@gregbo

gregbo commented Apr 29, 2021

Copy link
Copy Markdown
Author
  • Declared int main() to suppress compiler warning
  • Added code to handle zero and negative numbers
  • Refactored to use labs() to compute absolute values of long ints

@gregbo

gregbo commented May 5, 2021

Copy link
Copy Markdown
Author

Modified to exit with status 0 since quitting from the menu is normal termination

@gregbo

gregbo commented May 6, 2021

Copy link
Copy Markdown
Author

Modified to exit with status 0 since quitting from the menu is normal termination

add test data, refactor some printf() statements, and check for malloc() errors
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant