ASAP using c++ vectors Create a vector of characters and ask the user to enter their name, store each letter in the vector, then output the vector 1 letter per line.
#include <iostream>
#include <string>
#include <vector>
using namespace std;
int main() {
string name;
cout << "Enter your name: ";
getline(cin, name); // read name
vector<char> v;
// read name into vector
for (int i = 0; i < name.size(); ++i) {
v.push_back(name[i]);
}
// display vector
for (int i = 0; i < v.size(); ++i) {
cout << v[i] << endl;
}
return 0;
}

ASAP using c++ vectors Create a vector of characters and ask the user to enter their...
Write a C code using switch statement that will ask the user to enter a character. This character should be one of the first three characters of your name. The code then should check for the value of the character and output the following: If the character is the same as yo&r first letter then output "X=10" If the character is the same as your second letter then output "Y=5" If the character is the same as your Third letter...
in java please
Create an array of characters. Ask the user to enter two characters. Tell the user which character occurs more frequently For example, suppose the array contains (a, b, c, d, 8, 2, e, e, f, g and the user enterse and then the program will say that occurs more frequently thanL Bonus: Display a list of all characters in the array with their frequencies. Each value should appear only once For example for the array(a, b, c,...
write using C language
Part A: Using any loop statement Ask the user to enter first name and last name Read the characters the user typed using getchar) function. While reading you have to make sure you ignore the end of line statement. Print the characters on the screen using putchar () function and in this format First Name:Jack Last Name:Damon
Using C# Create a “Main” method that will take user input one line at a time until they enter the phrase “done”. Store each line entered into an ArrayList, so that one element of the ArrayList is one line of user input. You do NOT need to write your own ArrayList class, please use the standard library implementation of an ArrayList. After the user finishes typing in input, ask the user for a location and file name. Save the contents...
using c++ (NO STL libraries) create a program that will ask the user to enter two values (percent of free squares in the maze and the side dimensions of the maze) that will build a maze according to what the user enters. Along with asking the user these questions also ask the user the location they want to place the character inside the maze as well as the exit of the maze. In the maze free cells are blank. cells...
5.18 Ch 5 Warm up: People's weights (Vectors) (C++) (1) Prompt the user to enter five numbers, being five people's weights. Store the numbers in a vector of doubles. Output the vector's numbers on one line, each number followed by one space. (2 pts) Ex: Enter weight 1: 236.0 Enter weight 2: 89.5 Enter weight 3: 142.0 Enter weight 4: 166.3 Enter weight 5: 93.0 You entered: 236 89.5 142 166.3 93 (2) Also output the total weight, by summing...
Introduction to Java programming You will create a secure password. Ask a user to enter first name and last name. (Allow for mixed case) Create a random integer from 10-99. Create the password string that consists of the upper case letter of the last letter of his/her first name, the random number, and the first three letters of his/her last name in lower case. Example someone with the name Rob Lee might have a password that looks like B56lee. Your...
****C PROGRAMMING**** (100 points) Write a program that prompts the user to enter the name of a file. The program encoded sentences in the file and writes the encoded sentences to the output file. Enter the file name: messages.txt Output: encoded words are written to file: messages.txt.swt The program reads the content of the file and encodes a sentence by switching every alphabetical letter (lower case or upper case) with alphabetical position i, with the letter with alphabetical position 25...
Create the following programs in Java {Java1 difficulty} [Please create as simple as possible] a. Ask the user to enter their favorite number and favorite word. Pass both of these values to a method that will print the favorite word vertically the favorite number of times. b. Ask the user to enter 2 integers. Pass the integers to 2 different methods: one method to add the integers and print the sum (from the method); the second method to multiply the...
in java, Ask the user for a string. Display the number of whitespace characters in that string. Standard Input: this is a test Required Output: Enter a String\n Number of whitespace characters: 3\n