#include <stdbool.h>
Go to the source code of this file.
|
int | NotQuiteEdges (int *secondSmallest, int *secondLargest) |
| Reads numbers from the user (terminated by 0) and returns the second smallest and second largest in the corresponding parameters. More...
|
|
int | PrintNotQuiteEdges () |
| Reads numbers from the user (terminated by 0) and prints the second largest and second smallest numbers. More...
|
|
int | ReadNumber () |
| Prompts and reads a number from the user. More...
|
|
◆ NotQuiteEdges()
int NotQuiteEdges |
( |
int * |
secondSmallest, |
|
|
int * |
secondLargest |
|
) |
| |
Reads numbers from the user (terminated by 0) and returns the second smallest and second largest in the corresponding parameters.
- Note
- There must be at least two numbers to compute a valid output.
- Parameters
-
secondSmallest | Address to store the second smallest number. |
secondLargest | Address to store the second largest number. |
- Returns
- 0 on success, -1 if there are fewer than two numbers
◆ PrintNotQuiteEdges()
int PrintNotQuiteEdges |
( |
| ) |
|
Reads numbers from the user (terminated by 0) and prints the second largest and second smallest numbers.
- Note
- There must be at least two numbers to compute a valid output.
- Returns
- 0 on success, -1 if there are fewer than two numbers
◆ ReadNumber()
Prompts and reads a number from the user.
- Returns
- int The number read