Building a Calculator | C# | Tutorial 9

แชร์
ฝัง
  • เผยแพร่เมื่อ 19 ม.ค. 2025

ความคิดเห็น • 37

  • @RadiationHazard
    @RadiationHazard 5 ปีที่แล้ว +18

    You are the best teacher C# I have ever seen. Thank you very much!!!

    • @fathimhiri5926
      @fathimhiri5926 4 ปีที่แล้ว

      hi, can you help me and suggest me what i can see after this playist. thank you

    • @gaius6187
      @gaius6187 3 ปีที่แล้ว

      @@fathimhiri5926 How to make a Jew Generator In C#

    • @heavysaber9431
      @heavysaber9431 3 ปีที่แล้ว

      @@gaius6187 you need to study about stochastic human growth algorithm and pseudo-human artificial intelligence. After that create a human class with the usual properties and methods including the AI, then make a sub-class called Jews, then make and define a special method called unparalleledReligionDrivenStudyOfTheUnknown() or something of the like. Finally, create a method called generateJews() with the knowledge of human growth algorithm and exponential growth, and you will have a functioning Jewish society.

    • @gaius6187
      @gaius6187 3 ปีที่แล้ว

      @@heavysaber9431 what if i want to give them train tickets, and later free showers

  • @Dooxter.
    @Dooxter. 3 ปีที่แล้ว +2

    Man this is the first thing i did after watching one video on how to code and you explained it so well and it worked first go!

  • @AhsanHabibNadeem
    @AhsanHabibNadeem 2 ปีที่แล้ว

    hi mike dane i am getting more knowledge in your best tutorials about C# thanks dear

  • @mirkx7382
    @mirkx7382 ปีที่แล้ว

    i want to add evaluating functiionality and () bracket buttons in my calculator ? how can i do that?

  • @angelzash88
    @angelzash88 6 หลายเดือนก่อน

    You are amazing !!!

  • @eggman3661
    @eggman3661 2 ปีที่แล้ว

    thanks mike im learning game development on unity and unity is c# so this is very usefull

  • @MakeTaijitsuGreatAgain
    @MakeTaijitsuGreatAgain 5 หลายเดือนก่อน

    Why int32? What does the 32 mean ?

  • @taxidev
    @taxidev 2 ปีที่แล้ว

    Hey thank you so much! It is understantable and simple!

  • @fooballers7883
    @fooballers7883 ปีที่แล้ว

    Great tutorial...thanks

  • @inuraedirisinghe9559
    @inuraedirisinghe9559 4 ปีที่แล้ว

    #Mike h8w to make a Calculator using Visual studio Code but not Visual Studio? Pls reply!!

    • @unlxck3255
      @unlxck3255 3 ปีที่แล้ว

      The code is the same

  • @my_studies2888
    @my_studies2888 4 ปีที่แล้ว

    Do u have to use toint32, like does there have to be the byte number after the toint?

    • @venomglitches3991
      @venomglitches3991 4 ปีที่แล้ว

      yes, its either toint32 or 64
      my teacher said its better to use 32 if you don't really need to use 64 to prevent lag.

  • @jarell2805
    @jarell2805 3 ปีที่แล้ว

    how to add an error message when the user tries to enter decimal values in c#?

    • @b33bo93
      @b33bo93 3 ปีที่แล้ว

      if (number % 1 == 0)
      {
      Console.WriteLine("Error message ");
      }

  • @onedadev
    @onedadev 4 ปีที่แล้ว +1

    When I sum 3.6 + 2 it gives me a 38 result, why is that?

    • @thoughtlessanimations8895
      @thoughtlessanimations8895 4 ปีที่แล้ว

      Have you solved it? If not then reply to this comment with your code and I'll see if I can find the problem

    • @onedadev
      @onedadev 4 ปีที่แล้ว +1

      @@thoughtlessanimations8895 dude I dont have the code anymore, but I used string replacement to replace the "." with "," before making the calcs so it worked

    • @brojustplay1097
      @brojustplay1097 3 ปีที่แล้ว

      @@onedadev yeah it cant be a point

  • @lepre4720
    @lepre4720 3 ปีที่แล้ว

    Thanks Mike!

  • @ryad0013
    @ryad0013 4 ปีที่แล้ว

    when i tried to work with decimal number
    it doesn't work for me
    when i enter a decimal number into the console and click enter it says FormatException was unhandled
    this is my code :
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    namespace ConsoleApplication1
    {
    class Program
    {
    static void Main(string[] args)
    {
    Console.Write("Enter a number :");
    decimal num1 = Convert.ToDecimal(Console.ReadLine());
    Console.Write("Enter another number :");
    decimal num2 = Convert.ToDecimal(Console.ReadLine());
    Console.WriteLine(num1 + num2);


    Console.ReadLine();

    }
    }
    }

    • @ryad0013
      @ryad0013 4 ปีที่แล้ว

      @ToM4tto yes, i am sure of that

    • @scottisitt
      @scottisitt 4 ปีที่แล้ว

      I wasn't able to get decimal to work, either (on one of Mike's prior tutorials). int and double worked, but not decimal. ...But actually, I just tried double and decimal here, and they worked fine. 🤔

    • @MyFuturemusic
      @MyFuturemusic 4 ปีที่แล้ว

      @ToM4tto Hey mate! you need to use a comma instead of a dot in some cases in c# i'v tried figuring out why that is for some but not some others since dot is the most normal thing to use in programminglanguages.
      you can get it fixed by doing some other coding before, but gives more headache then joy.
      so, use a comma ,

  • @arteinterativa
    @arteinterativa 4 ปีที่แล้ว +1

    AMAZING DUDE! BRAZIL!!!

  • @rubenlyon3927
    @rubenlyon3927 4 ปีที่แล้ว

    This is the best thx man

  • @elainishri5026
    @elainishri5026 5 ปีที่แล้ว

    thank u

  • @AnimeRPG1
    @AnimeRPG1 3 ปีที่แล้ว

    When I'm watching a video and I'm like:
    How do I get the user to also type the symbol?
    Me: Perhaps an if statement...googles if statement.
    Creates a very basic Calculator!
    Console.Write("Enter a Whole number ");
    int num1 = Convert.ToInt32(Console.ReadLine() ); //Convert string value from ReadLine to an integer.
    Console.Write("Enter another Whole number ");
    int num2 = Convert.ToInt32(Console.ReadLine());
    Console.Write("Enter a symbol (+, -, /, *) no cammas: ");
    string mathSym = Console.ReadLine(); //Store user math symbol as string
    if (mathSym == "+") //Match user math symbol to string & execute.
    {
    Console.WriteLine(num1 + num2);
    Console.ReadLine();
    return; //Exit program
    }
    else if (mathSym == "-")
    {
    Console.WriteLine(num1 - num2);
    Console.ReadLine();
    return;
    }
    else if (mathSym == "*")
    {
    Console.WriteLine(num1 * num2);
    Console.ReadLine();
    return;
    }
    else if (mathSym == "/")
    {
    Console.WriteLine(num1 / num2);
    Console.ReadLine();
    return;
    }
    else
    {
    return;
    }
    Console.ReadLine();

    • @AnimeRPG1
      @AnimeRPG1 3 ปีที่แล้ว

      @EpicDev Thanks, I'll check into it.

  • @khojiakbarkhonisakov7785
    @khojiakbarkhonisakov7785 4 ปีที่แล้ว

    Cool

  • @brojustplay1097
    @brojustplay1097 3 ปีที่แล้ว

    Hey, great vid, for some reason it didn't work but still ty