This project focuses on developing a simple yet effective health monitoring program. The system calculates and provides a personalized health rating based on key metrics: blood pressure, body temperature, and heart rate.
On this page, you’ll find an in-depth look at the program’s design, logic, and visual elements. We also share detailed testing logs to demonstrate its accuracy and reliability, as well as a step-by-step breakdown of the entire development process.
The development of the program

The first section of the code sets up the foundation of the program. When starting the project in Replit, it automatically includes #include <iostream> and defines the int main() function. We also added #include <limits>, which allows the program to handle the largest and smallest possible data values. This helps prevent repeated error messages and ensures that inputs stay within valid ranges.
A while (true) loop is used at the beginning to continuously run the program, allowing it to restart as needed. Within this loop, we define global variables such as heart rate, temperature, blood pressure, Restart_Program, and User_Input.
The first interaction focuses on user input. Here, the user is prompted to type “yes” or “no” (in any case variation). If the input is invalid, the loop repeats until a correct response is given.
To display text to the user, we use std::cout <<, and for receiving input, std::cin >> is used. The if statement checks the user’s response: if “yes” is entered, the program proceeds to the next step. If “no” or an invalid input is given, the loop continues prompting the user until a valid answer is received.

This section shows how the program handles heart rate input. The code is placed inside a while (true) loop to ensure that if the user enters an invalid value, the prompt repeats until a correct input is provided.
To check if the heart rate input is valid, the program uses std::cin.fail(). This function verifies whether the user’s entry matches the expected data type — for example, it prevents letters from being entered where numbers are required. If an invalid value is detected, the program displays an error message prompting the user to enter a valid heart rate.
The std::cin.ignore() function is used to clear any unwanted characters left in the input buffer, preventing errors in subsequent inputs. Additionally, std::cin.ignore(std::numeric_limits<std::streamsize>::max(), '\n') ensures that the buffer is fully cleared by skipping everything up to the next newline character.
During development, an issue arose where the program kept displaying “invalid input” even when a correct number was entered. This was resolved by properly combining cin.fail() with cin.ignore(), ensuring smooth and accurate input handling.
Originally, ASCII art images were planned to display heart icons, but these caused performance issues and increased response delays. To maintain the program’s speed and quality, emojis and simple icons were used instead. All icons and images throughout the program are AI-generated, chosen to keep the interface visually appealing without compromising performance.
The temperature and blood pressure input sections follow the same logic and structure as the heart rate input. Each block uses a similar while (true) loop to ensure valid entries before moving forward.
For temperature, a thermometer icon is displayed next to the prompt, making it intuitive and visually relevant. Similarly, the blood pressure input uses a syringe icon alongside the text “Enter Your Blood Pressure” to clearly indicate the type of data required.
These sections ensure that each vital sign is properly defined and stored, so they can be accurately displayed later on the results page.
To keep the output clear and easy to read, each message ends with \n, which moves the text to a new line. This formatting choice helps separate sections, improves readability, and creates a clean visual hierarchy for the user throughout the program.

In the final stage of the program, all the vital signs entered by the user are displayed, along with their health condition feedback.
To clearly separate this results section from the earlier input steps, the code first uses an ASCII design consisting of three large white blocks. This acts as a visual divider and makes it easy for users to see where their results begin. A prominent title — “Results of Your Vitals” — is then displayed, followed by another ASCII design to segment the individual vital signs: heart rate, temperature, and blood pressure.
For each vital sign, the program performs checks using if and else if statements. For example, the heart rate is analyzed first:
- If the value is between 80 and 100 bpm, a “Safe, Heart Rate” message is shown.
- If it’s above 100, an “Alarm: Heart rate is too high” warning appears.
- If it’s below 80, an “Alarm: Heart rate is too low” alert is displayed.
Similar logic is applied to temperature and blood pressure, each with its own specific thresholds. Relevant icons are included next to each result to make the feedback intuitive and visually clear — for instance, a fire icon appears alongside “Your temperature is too high,” emphasizing urgency.
Each result is displayed neatly on a single line, formatted with arrows and units to ensure clarity and readability. All icons throughout the program are AI-generated, enhancing the design without affecting performance.

The final part of the program focuses on looping and restarting. Just like earlier sections, ASCII designs are used here to visually separate this part of the code, making it easy to understand where the main program ends and the restart option begins.
At this stage, users are asked whether they would like to restart the program. This allows new users to input their vitals or gives the same user a chance to try different values.
The code checks the Restart_Program variable using an if statement:
- If the user enters “Yes,” the loop breaks and
return 0is called. - This resets the program, clearing previous values and returning to the initial input screen.
By including this restart feature, the program offers a smooth, user-friendly experience, allowing for repeated testing and use without needing to close or manually reset the application.

The basic health monitor program is designed with a simple, clean layout to ensure a smooth and user-friendly experience. All headings and text are presented clearly and are easy to read, reducing the chances of user confusion when navigating through each section.
As shown in the screenshot above, the program’s functionality works as intended — all vitals are displayed correctly and match the user’s input values.
The use of ASCII lines and blocks effectively separates different sections, creating a visually organized flow throughout the program. This not only improves readability but also makes the overall presentation more polished and professional.
At first glance, the program appears simple and straightforward, making it approachable and easy for anyone to use, even on their first try.
The improvements made to the program

One of the first improvements implemented in the program was the addition of a personalized name feature. Users are now prompted to enter their name at the start of the program, which is then stored in a global variable called PatientName.
This name is displayed on the results page, presented clearly on a single line alongside the user’s health data.
By including the user’s name in the final summary, the program feels more personal and engaging. This added touch helps create a stronger connection with users, making the health monitor feel tailored specifically to them — a feature that can increase user satisfaction and encourage more people to try the program.

To further enhance the program, a date and time feature was introduced. At the beginning of the code, #include <ctime>was added to enable time and date functions.
The line time_t now = time(0); captures the exact date and time when the user’s vitals are recorded. This raw time value is then converted into a human-readable format and stored in a variable named dt, which stands for date and time.
Finally, on the results page, the program outputs the current date and time using the dt variable. This addition makes the health summary more informative and professional, allowing users to clearly see when their vitals were recorded.

One challenge encountered during development was console clutter. When multiple users enter data consecutively, the console fills up with input and output, making it difficult to distinguish between different patients’ information. This can confuse users and degrade the program’s performance over time.
After researching solutions, a method was implemented to clear the console screen between user sessions. Within the restart logic’s final if statement, the commands (void)system("CLS") and (void)system("clear") were added to clear the screen before starting a new session.
Since system("CLS") only works on Windows systems and Replit’s environment is Linux-based, both commands were included to ensure compatibility across platforms. This dual approach guarantees that whether the program runs on Windows or Linux, the console clears properly.
Adding a break after the clear commands ends the loop, allowing the program to reset smoothly without clutter.
This feature improves usability by removing old data from view, reducing confusion, and maintaining performance, especially when multiple users are entering information consecutively. The improvement can be seen in the image above

Another key performance improvement involved removing repetitive std:: prefixes from the code. Since the program heavily relies on cin, cout, and other standard library functions, constantly writing std:: added unnecessary verbosity.
To streamline this, a using namespace std; statement was added at the beginning of the code. This allows the program to call standard functions directly without prefixing them with std::.
This change not only makes the code easier to read and maintain but also helps the program run more efficiently in the console environment by reducing the number of commands executed.
The impact of this optimization can be seen in the image above.

The screenshot above demonstrates a key visual improvement: one row of ASCII blocks was removed to create a more balanced and aesthetically pleasing layout. This adjustment aligns the top and bottom ASCII art sections, giving the program a cleaner and more polished appearance.
Additionally, multiple cout << "\n"; statements were strategically added around the titles and on both sides of the ASCII art. This extra spacing prevents text from overlapping with the ASCII images and creates a more spacious, easy-to-read interface.
These formatting tweaks not only enhance the program’s visual appeal but also improve readability and overall user experience, showing how thoughtful code formatting can optimize both design and performance.

The initial part of the code that asked users whether they wanted to start the health monitor was removed as it was deemed unnecessary. Since users launching the program are inherently motivated to begin, this prompt was redundant and only added extra steps.
By eliminating this initial query, the program’s logic becomes more streamlined and efficient. This reduces potential design flaws and improves overall performance by minimizing unnecessary lines of code. Users can now jump straight into entering their health data, creating a smoother and more intuitive experience.