programming-examples/c-sharp/Mathematics/C# Program to Multiply given Number by 4 using Bitwise Operators.cs
2019-11-15 12:59:38 +01:00

29 lines
588 B
C#

/*
* C# Program to Multiply given Number by 4 using Bitwise Operators
*/
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication
{
class Program
{
static void Main(string[] args)
{
int number, tempnum;
Console.WriteLine("Enter an integer :");
number = int.Parse(Console.ReadLine());
tempnum = number;
number = number << 2;
Console.WriteLine("{0},{1}", tempnum, number);
Console.ReadLine();
}
}
}
/*
Enter an integer :
120
120,480