Objective
Write a C# function named "Double" to calculate and return an integer number doubled. For example. Double(7) should return 14.
Write Your C# Exercise
C# Exercise Example
// Importing the System namespace to access basic system functions
using System;
class Program
{
// Function to calculate and return the doubled value of an integer
public static int Double(int number)
{
// Multiply the input number by 2 to get the doubled value
return number * 2;
}
// Main method where the Double function is called
public static void Main()
{
// Test the Double function with an example number
int result = Double(7);
// Display the doubled value of 7
Console.WriteLine("Double(7) returns: {0}", result);
}
}