29 lines
588 B
C#
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 |