Question: C# program Print a sequence of alphabets Given an alphabet, print all the alphabets up to and including the given alphabet. Write a function solution
C# program
Print a sequence of alphabets
Given an alphabet, print all the alphabets up to and including the given alphabet.
Write a function solution that accepts a character C, and prints alphabets up to the given character.
Input d
Output a b c d
Where,
There must be a single space between consecutive alphabets.
There should be no spaces after the last alphabet.
Assume that,
C is a character within the range [{'a'...'z'}, {'A'...'Z'} ].
Alphabet(s) in input & output are case-sensitive.
PLEASE COMPLETE THE PARTIAL CODE BELOW
using System; public class ProblemSolution { public void solution (char C) { } } class DriverMain { //Your program will be evaluated by this main method and several test cases.. public static void Main () { char C; ProblemSolution problemsolution = new ProblemSolution (); C = Convert.ToChar (Console.ReadLine ()); problemsolution.solution (C); } }
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
