C# arithmetic operators

Your video will begin in 10
66 Views
Published
C# arithmetic operators tutorials example explained

#C# #arithmetic #operators

using System;

namespace MyFirstProgram
{
class Program
{
static void Main(string[] args)
{
int friends = 5;

friends = friends + 1;
//friends += 1;
//friends++;

//friends = friends - 1;
//friends -= 1;
//friends--;

//friends = friends * 2;
//friends *= 2;

//friends = friends / 2;
//friends /= 2;

//int remainder = friends % 2;
//Console.WriteLine(remainder);

Console.WriteLine(friends);

Console.ReadKey();
}
}
}
Category
Bro Code
Tags
Calculator (Invention), Arithmetic (Literature Subject), Help
Be the first to comment