Postingan

Menampilkan postingan dari November, 2022

Kode Program Pembuatan Sederhana Kalkulator C#

  using System ; namespace Calculator {     class Calculator     {         public static double DoOperation ( double num1 , double num2 , string op )         {             double result = double . NaN ; // Default value is "not-a-number" which we use if an operation, such as division, could result in an error.             // Use a switch statement to do the math.             switch ( op )             {                 case "a" :                     result = num1 + num2 ;                     break ;                 case "s" :                     result = num1 - n...