Skip to content

Conversation

@dhruvjanghu
Copy link

Description

Added a new usage example demonstrating the greatest_common_divisor function in SplashKit.
includes version in 4 different languages.

No additional dependencies are required for this change.

Type of change

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

All language versions were tested locally using MSYS2 and SplashKit libraries.
Each file was compiled and executed successfully, producing the expected visual output:

  • Displays the title “Greatest Common Divisor Example”.
  • Shows Number A, Number B, and the GCD result.
  • Pressing ESC cleanly exits the window.

No warnings or build errors occurred.

Testing Checklist

  • Tested in latest Chrome (for web documentation build)
  • Tested in latest Firefox
  • npm run build
  • npm run preview

Folders and Files Added/Modified

  • public/usage-examples/utilities/gcd_1_example.cpp
  • public/usage-examples/utilities/gcd_1_example-oop.cs
  • public/usage-examples/utilities/gcd_1_example-top-level.cs
  • public/usage-examples/utilities/gcd_1_example.py
  • public/usage-examples/utilities/gcd_1_example.txt
  • public/usage-examples/utilities/gcd_1_example.png

@netlify
Copy link

netlify bot commented Oct 5, 2025

Deploy Preview for splashkit ready!

Name Link
🔨 Latest commit 6085c6d
🔍 Latest deploy log https://app.netlify.com/projects/splashkit/deploys/68e29cc93bd4fc0008874129
😎 Deploy Preview https://deploy-preview-667--splashkit.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link

@Mdanial01 Mdanial01 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The commit has code from other PR as well. Check the following link to get an idea about branching in Git:

https://git-scm.com/book/en/v2/Git-Branching-Branches-in-a-Nutshell

Copy link

@222448082Ashen 222448082Ashen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Description

This PR adds four new usage example files demonstrating the use of the greatest_common_divisor (GCD) function in C++, Python, and C# (Top-level and OOP styles).

These examples show:

  • Correct implementation of the Euclidean algorithm
  • Consistent output and behavior across all languages
  • Clear beginner-friendly variable names and UI text

There are no external dependencies required for this change.


Type of change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation

How Has This Been Tested?

The code was reviewed manually to verify:

  • Correct GCD logic in all 4 files
  • Correct SplashKit usage
  • Same output and behavior across all languages
  • Proper window setup and exit handling

Test method:

  • Manual code review

  • Logic matched expected GCD results

  • UI output verified by inspection

  • Tested in latest Chrome

  • Tested in latest Firefox

  • npm run build

  • npm run preview


Checklist

If involving code

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings

If modified config files

  • package.json
  • astro.config.mjs
  • netlify.toml
  • docker-compose.yml
  • custom.css

Folders and Files Added/Modified

  • Added:

    • public/usage-examples/utilities/gcd_1_example.cpp
    • public/usage-examples/utilities/gcd_1_example.py
    • public/usage-examples/utilities/gcd_1_example-top-level.cs
    • public/usage-examples/utilities/gcd_1_example-oop.cs
  • Modified:

    • None

Additional Notes

  • All four files follow the same logic and visual output.
  • The examples are consistent and suitable for beginners.
  • The implementation is clean and efficient.
  • This PR was reviewed and approved.

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.

3 participants