Divided Operator in C#
In this article we will explain how to use ( / ) Divided Operator in C#
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)
{
int number1, number2, results;
//Size of int : Signed 32-bit integer, accept numerical values
number1 = 10;
number2 = 5;
results = number1 / number2;
Console.Write("Your Results is : "+results);
//Writes the line
//results is a local variable which type of integer
Console.ReadKey();
// Console.ReadKey is method and we can use Console.ReadKey method for reading purpose
// Press key and back to console window
}
}
}
The output is :
Your Results is : 2
The output is :
Your Results is : 2
0 comments:
Post a Comment
Do not enter spam link