C# Algorithm #1 – Sum 2 Int’s

Written by Peter Steele

June 25, 2021

Categories: C#
C# Algo 1 Title

In this video, we will walk through a simple C# Algorithm example where you take 2 numbers and calculate their sum. If both values are the same however, you need to triple the sum and return that instead. 

We also learn about the Ternary operator and how to utilize it to shrink down bulky If statements in code. 

Related Articles

0 0 votes
Article Rating
Notify of
Inline Feedbacks
View all comments
Peter Steele

Peter Steele

Software Engineer/Site Owner

I am a father of 2, happily married and I also love to game! I started this site as a way to pass on what I have learned as a software engineer. Hopefully I can pass on some knowledge to those seeking it and make someone's life just a little better. Happy coding!

Pin It on Pinterest