Write a C++ program that takes a string containing a full name in lower case letters and outputs each part of the name separately with initial letters capitalized. The name should be in the form of first, middle, and last name, separated from each other by a single space. For example, if the name string contains "heidi kim lee" then the program would output First name: Heidi Middle name: Kim Last name: Lee
#include <iostream>
using namespace std;
int main() {
string fn, mn, ln;
cin>>fn;
cin>>mn;
cin>>ln;
if(fn[0] >='a' && fn[0]<='z'){
fn[0] = fn[0]-32;
}
if(mn[0] >='a' && mn[0]<='z'){
mn[0] = mn[0]-32;
}
if(ln[0] >='a' && ln[0]<='z'){
ln[0] = ln[0]-32;
}
cout<<"First name: "<<fn<<endl;
cout<<"Middle name: "<<mn<<endl;
cout<<"Last name: "<<ln<<endl;
return 0;
}



Write a C++ program that takes a string containing a full name in lower case letters...
*****Requiremrnt:
1. Please do not use any array or arraylist
2. collects only a single String input
3. uses at least 3 String methods
1) Just Initials: Print just the initials in upper case letters separated by periods 2) Last Name First With Middle Initial: Print the last name in lower case with the first letter capitalized, followed by a comma and the first name in in lower case with the first letter capitalized and then the middle initial capitalized...
Write a program that separately prompts the user for a first name and last name and outputs a string containing the following information, in order: a. First letter of the user's name. b. First five letters of the user's last name. c. A random two-digit integer You must construct the desired string ensuring all characters are lowercase; output the identification string accordingly. Assume the last name contains at least 5 characters. You must use the Random (java.util.Random) class to generate...
(Obtaining Substrings) Write a program that prompts the user to enter full name contains the first name, middle name and last name separated by a space and extract the first name, middle name and last name from the input string. Here is a sample run: Enter the name: Dennis MacAlistair Ritchie First Name: Dennis Middle Name: MacAlistair Last Name: Ritchie JAVA
Python code. No use of def() or return.
7a)Create a program that asks the user for their full name (first, middle, and last). You can assume that compound names, such as Jamie-Lynn are joined by a hyphen, that names are separated by a space and that the user enters their data in the correct format. The program should then separate the first name, middle name, and last name from the single string entered by the user and save each piece...
use Java and it must work for any name
String Manipulator Write a program to manipulate Strings. Store your full name into one String variable. It must include first name, middle name, last name, cach separated by spaces. Spaces could vary. If you do not have a middle name make up one For example the string to be processed could be any of the following John Plain Doe John Plain Doc John Plain Doe Your program must be able to...
C Program In this assignment you'll write a program that encrypts the alphabetic letters in a file using the Vigenère cipher. Your program will take two command line parameters containing the names of the file storing the encryption key and the file to be encrypted. The program must generate output to the console (terminal) screen as specified below. Command Line Parameters Your program must compile and run from the command line. The program executable must be named “vigenere” (all lower...
C++
Lab Quiz #3-B Upper Case Letters Write a main() program that reads a string and calls the function int countUpper(string) which counts and returns the number of upper case letters in the string. The main) prints the result Sample inputs/outputs: nter a string: This is a C++ quIz numBer 4 This is a C++ quIz numBer 4" has 5 upper letters
JAVA STRINGS AND CHARACTERS - USE SIMPLE CODING 1. Write a program that takes a string of someone's full name and prints it out last name first. You may use the available string manipulation methods. Example: "George Washington" "Washington, George" 2. Write a program that will take a string of someone's full name, and break it into separate strings of first name and last name, as well as capitalize the first letter of each. Example: "joseph smith", "Joseph" "Smith"
1. Write a C++ program that will ask the user for their full name and calculate the user's weekly salary based on their hourly wage and the number of hours they worked, assuming no overtime at this point. Sample program run: Please enter first name: Elmer Please enter middle initial (Enter space if none): J Please enter last name: Fudd Enter hours worked: 37.5 Enter hourly rate: 10.35 Your name is: Elmer J. Fudd Your weekly salary is: $388.12 2....
USING C# 1. Write a program that takes outputs a string, an integer and a floating-point number separated by commas. Sample output: Bob Marley, 20, 5.2 2. 2. Write a program that asks the user for a string of letters of any size (no spaces), and finally a special character (values 33 to 47 in the Ascii table, or ‘!’ to ‘/’). Generate a random number of any size, integer or floating point, and combine those three pieces of information...