Write a C# Sharp program to insert a given string into middle of the another given string of length 4
- برمجة سي شارب
- برمجة
- 2021-05-16
- MarwaMohammed
الأجوبة
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace exercises
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine(test("[[]]","Hello"));
Console.WriteLine(test("(())", "Hi"));
Console.ReadLine();
}
public static string test(string s1, string word)
{
return s1.Substring(0, 2) + word + s1.Substring(2);
}
}
}
أسئلة مشابهة
القوائم الدراسية التي ينتمي لها السؤال
