About 7,830 results
Open links in new tab
  1. C# | Design a simple calculator using if else if statements

    Mar 18, 2023 · C# if else if example: Here, we are going to design a simple calculator using if else if conditional statements in C#. The task is to design a simple calculator using if else if statements with following operations: using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace DecisionMaking2 {

  2. Building simple calculator with C# - Stack Overflow

    Mar 14, 2021 · I am trying to build a very easy calculator on C#, I would like to store the result on the variable "result" and display it by means of Console.WriteLine(result). For some reason Console.

  3. c# - Very simple calculator with four basic operations using only …

    Aug 26, 2019 · I created a simple calculator with multiplication, division, addition, and subtraction. Is there a way to write it shorter? I am a beginner so I do not know much about programming other than if...e...

  4. Basic Calculator Using If Statements in C# - juanantonioripoll.es

    Basic Calculator Using If Statements in C#. This C# program implements a simple calculator that allows users to perform basic arithmetic operations on two numbers. The program follows a structured approach to prompt the user for input, validate the operation, and compute the result. How the program works: 1. The user is prompted to enter the ...

  5. How to Make a Calculator in C# - GeeksforGeeks

    Jul 20, 2022 · In this article, we will learn how to create a calculator in C#. Addition of two numbers. Difference between two numbers. Product of two numbers. Division of two numbers. Declare local variables num1 and num2 for two numeric values. Enter the choice. Takes two numbers, num1, and num2. do-while jump to an operator selected by the user.

  6. Create Basic Calculator Using Windows Forms And C# - C#

    In this article I am going to show you how to make a very basic Calculator application using Windows forms application and C#.

  7. C#: A menu-driven program for a simple calculator - w3resource

    Dec 20, 2024 · C# Sharp programming, exercises, solution: Write a program in C# Sharp which is a menu-driven program to perform simple calculations.

  8. Calculator using If Statement in C# - tutorialsly.com

    using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace ConsoleApplication { class Program { static void Main(string[] args) { int a; Console.Write("Enter Your Marks: "); a = Int32.Parse(Console.ReadLine()); if (a > 100 || a 0) //if given by user marks'a' is greater then 100 and Console.Write("Invalid ...

  9. Basic calculator using if - Exercises C#

    Aug 22, 2020 · Basic calculator using if Last updated: 8/22/2020 ⁃ Difficulty: Easy Write a program in C# that asks the user for two numbers and one operation (+, -, x, /) then calculate the operation and display the result on the screen.

  10. c# - If statement in Calculator - Stack Overflow

    Jan 4, 2015 · if (b.Text == "√") result.Text = Convert.ToString(Math.Sqrt(res)); expression.Text = "sqrt(" + Convert.ToString(res) + ") ="; result.Text = Convert.ToString(Math.Sqrt(res)); if (square_root_pressed) expression.Text = exp + " sqrt(" + Convert.ToString(res) + ")"; else. exp = expression.Text;