Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

math with c sharp

public int number_1 = 13
public int number_2 = 25

public int total_number = number_2 - = number_1
Console.Writeline(total_number) //result should be 12 :)

public int total_number_2 = number_1 + = number_2
Console.Writeline(total_number_2) //result should be 28 :)

public int total_numner = number_2 + = number_2
Console.Writeline(total_number_2) //result should be dubble the amount of number 2: 50 :)
Comment

math in C#

class Calc {
  
    
    static void Main()
    {
  		double squrt_value = Math.Sqrt(64);
        
        Console.WriteLine("Sqrt value = " + squrt_value) 
        
        double e = Math.E;
  
    
        Console.WriteLine("Math.E = " + e);
  
    
        double pi_value = Math.PI;
  
    
        Console.WriteLine("Math.PI = " + pi_value);
        
        double min_value = Math.Min(5, 10);
        
        Console.WriteLine("Min value =" + min_value);
        
        
        
        
    }
}
Comment

basic math functions in c#

int a = 10;
int b = 5;
Console.WriteLine("------------Basic math functions----------------");
Console.WriteLine("Multiplication:- ");
Console.WriteLine(a*b);
Console.WriteLine("Subtraction:- ");
Console.WriteLine(a-b);
Comment

PREVIOUS NEXT
Code Example
Csharp :: how to return a value in c# 
Csharp :: c# write line 
Csharp :: label wpf 
Csharp :: unity check if gameobject is inside collider 
Csharp :: how to access asp button of gridview 
Csharp :: c# generate random int list 
Csharp :: for statement syntax C sharp 
Csharp :: check if two timespans intersect c# 
Csharp :: How to make a simple console select screen using C# ReadKey 
Csharp :: wpf relativesource 
Csharp :: c# convertir caracter con tilde 
Csharp :: c#l list<string initialize 
Csharp :: pubxml environment variables 
Csharp :: csharp 3d array length 
Csharp :: c# get index of item in list 
Csharp :: convert getdate to ist c# 
Csharp :: Startup.cs class is missing in .NET 6 
Csharp :: serialize xml as array C# 
Csharp :: how to fade c# form 
Csharp :: stop playing audiosource 
Csharp :: unity stop velocity movement 
Csharp :: You can get events when an object is visible within a certain camera, and when it enters or leaves, using these functions: 
Csharp :: uwp roaming data sample 
Csharp :: cread 2-dimensional array in c# 
Csharp :: double quotes in a string c# 
Csharp :: C# Change color 
Csharp :: foreach for IEnumerable 
Csharp :: unity GetNestedComponentsInChildren 
Csharp :: HttpClient .net Core add Certificate 
Csharp :: inheritance in c# 
ADD CONTENT
Topic
Content
Source link
Name
8+8 =