From 79bbddc0a3bd759ae631c1ac6a3ab8b365ee2cb8 Mon Sep 17 00:00:00 2001 From: Kevin Date: Mon, 2 Feb 2026 14:59:09 -0800 Subject: [PATCH 1/2] NaN error fixed --- main.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/main.cpp b/main.cpp index 5411e7a3..3e4107b4 100644 --- a/main.cpp +++ b/main.cpp @@ -16,8 +16,12 @@ int main() cout << "Addition: " << x + y << endl; cout << "Subtraction: " << x - y << endl; cout << "Multiplication: " << x * y << endl; + if(y == 0) { + cout << "Dividing by zero is not a number." << endl; + } else { cout << "Division: " << x / y << endl; cout << "Remainder: " << x % y << endl; + } cout << "Square Root: " << sqrt(x) << endl; cout << "Square: " << pow(x, y) << endl; From 65ec47826ea6c10489060bed999875ad638fe73a Mon Sep 17 00:00:00 2001 From: Kevinn-Xiong Date: Mon, 16 Feb 2026 22:45:59 -0800 Subject: [PATCH 2/2] Create README.md --- README.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 00000000..8710d6d4 --- /dev/null +++ b/README.md @@ -0,0 +1 @@ +[![Build C++](https://github.com/Kevinn-Xiong/MyFirstExample/actions/workflows/build.yml/badge.svg)](https://github.com/Kevinn-Xiong/MyFirstExample/actions/workflows/build.yml)