Answer to Question #198976 in C# for Pragadeesh

Question #198976

Read the four input string variables s1, s2, s3, s4 and store it in single string variable "COLLEGE" and display the string.


1
Expert's answer
2021-05-26T12:59:57-0400

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();
        }
    }
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS