Read the four input string variables s1, s2, s3, s4 and store it in single string variable "COLLEGE" and display the string.
Solution example:
using System;
namespace InputString
{
class Program
{
// Read the four input string variables s1, s2, s3, s4 and store it in single string variable "COLLEGE" and display the string.
static void Main(string[] args)
{
string s1, s2, s3, s4, COLLEGE;
Console.WriteLine("Input string variables s1");
s1 = Console.ReadLine();
Console.WriteLine("Input string variables s2");
s2 = Console.ReadLine();
Console.WriteLine("Input string variables s3");
s3 = Console.ReadLine();
Console.WriteLine("Input string variables s4");
s4 = Console.ReadLine();
COLLEGE = string.Join("", s1, s2, s3, s4);
Console.WriteLine(COLLEGE);
Console.ReadKey();
}
}
}
Comments
Leave a comment