2012-06-21T09:07:58-04:00
write a c# program which will accept a text from user and remove the extra spaces within there
1
2012-06-22T08:36:27-0400
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace Question11135 { class Program { static void Main(string[] args) { string inputstr = ""; string outputstr = ""; inputstr = Console.ReadLine(); for (int i = 0; i < inputstr.Length; i++) { if (inputstr[i] != ' ') { outputstr += inputstr[i]; } } Console.Write(outputstr); Console.ReadLine(); } } }
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 !
Learn more about our help with Assignments:
C#
Comments