This is the logic building and interesting C++ programming exercise. The C++ program Capitalize all first letters of the Words in String in a given string e.g. “how are you pro programer” to ” How Are You Programmer”.
Source Code
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace capitalizeFirst
{
class Program
{
static void Main(string[] args)
{
//Your code goes here
Console.WriteLine("Hello, world!");
String userEntered = "";
Console.WriteLine("Enter some text to capitalize first letter");
userEntered = Console.ReadLine();
Console.WriteLine(userEntered.First().ToString().ToUpper()+ userEntered.Substring(1));
userEntered = Console.ReadLine();
}
}
}
Output of the Program
Asad Niazi is Software Engineer , Programmer, Web Developer and a young mentor of
BloggersTown and PProgramming. Asad Love to writes about Technology, Programming, Blogging and make money online.
0 comments:
Post a Comment