@@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.
@@thoughtlessanimations8895 dude I dont have the code anymore, but I used string replacement to replace the "." with "," before making the calcs so it worked
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);
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. 🤔
@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 ,
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();
You are the best teacher C# I have ever seen. Thank you very much!!!
hi, can you help me and suggest me what i can see after this playist. thank you
@@fathimhiri5926 How to make a Jew Generator In C#
@@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.
@@heavysaber9431 what if i want to give them train tickets, and later free showers
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!
hi mike dane i am getting more knowledge in your best tutorials about C# thanks dear
i want to add evaluating functiionality and () bracket buttons in my calculator ? how can i do that?
You are amazing !!!
thanks mike im learning game development on unity and unity is c# so this is very usefull
Why int32? What does the 32 mean ?
Hey thank you so much! It is understantable and simple!
Great tutorial...thanks
#Mike h8w to make a Calculator using Visual studio Code but not Visual Studio? Pls reply!!
The code is the same
Do u have to use toint32, like does there have to be the byte number after the toint?
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.
how to add an error message when the user tries to enter decimal values in c#?
if (number % 1 == 0)
{
Console.WriteLine("Error message ");
}
When I sum 3.6 + 2 it gives me a 38 result, why is that?
Have you solved it? If not then reply to this comment with your code and I'll see if I can find the problem
@@thoughtlessanimations8895 dude I dont have the code anymore, but I used string replacement to replace the "." with "," before making the calcs so it worked
@@onedadev yeah it cant be a point
Thanks Mike!
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();
}
}
}
@ToM4tto yes, i am sure of that
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. 🤔
@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 ,
AMAZING DUDE! BRAZIL!!!
Fala BR
This is the best thx man
thank u
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();
@EpicDev Thanks, I'll check into it.
Cool
Hey, great vid, for some reason it didn't work but still ty