You are hired to create a program that lets the user play with the string data type. This program will have many features and you will ask the user which feature does he wants to use. For this first you need to create a menu, display the user with the choices that he has and what does he need to enter in order to use that feature.
The features to be included are
Feature 1:Let’s the user prints his name, and asks him is it am or pm, and print the message accordingly
Hi, name, Good Morning
Hi, name, Good Evening
Feature 2
Ask the user to enter two strings and then compare both of them to see if the entered strings are same and not. Display the message appropriately.
Feature 3
Ask the user to enter a sentence in a string and write a program to find a substring within a string. If found display its starting position.
Feature 4
Ask the user to enter a word, and then display letter of word on separate lines.
For example if user inputted “Hello”, it should be displayed like
H
E
L
L
0
1. Write a program to store integer elements in an array named test of size 10 with initial values (5,9,57,3,9,21,57,6,9,3) and print it.
2. Modify the program to read to display the array contents in reverse order.
3. Modify the program to find the sum of all elements of the array.
4. Modify the program to copy the elements from the test array into another array named testcopy.
8. Modify the programs to count and display the frequency of each element of array test.
9. Modify the program to find the maximum and minimum element in array test.
Write a function power(a, b), to calculate the value of a raised to b, using: (a) non-recursive method (b) recursion
Write a program to take the values of two integers and use pointers to add 10 to the value of each integer.
Write a function countEven(int*, int) which receives an integer array and its size, and returns the number of even numbers in the array.
Write a program that reads a person’s name in the following format: first name, then middle name or initial, and then last name. The program then outputs the name in the following format: last name, first name. middle initial. For example the input Mary Average User should produce the output User, Mary A.Your program should work the same and place a full stop after the middle initial even if the input did not contain a full stop. Your program should allow for users who give no middle name or initial. In that case, the output of courses contains no middle name or initial. For example, the input Mary User should produce the output User, Mary Your program should also accept names in lowercase, uppercase or a mix of lowercase and uppercase, and display that in the correct format, e.g. if the input is mArY average USER should produce the output User, Mary A.
You have to write a program to read an input file character by character to help Peter solve the following activity in his activity book. The paragraph below is given: We h2pe that 32u e5723ed the acti4it3. A6ter 32u ha4e c2mpleted the acti4it3, 0e5d 32ur re0ult t2: The Acti4it3 C2mpetiti25, Bett3 Da4i0 0treet 99, Auckla5d Park, 989, a5d 0ta5d a cha5ce t2 wi5 a hamper c250i0ti51 26 c2l2uri51 a5d acti4it3 b22k0, c2l2uri51 pe5cil0 a5d pe50. Create an input file activity.dat with the paragraph above. The numbers 0 to 7 have to be replaced as follows: 0 must be replaced by s 1 must be replaced by g 2 must be replaced by o 3 must be replaced by y 4 must be replaced by v 5 must be replaced by n 6 must be replaced by f 7 must be replaced by j Ask the user to input the names of the input and output files. Read the input file character by character, and write the character (if it stays the same) to the output file, or write the changed character to the output file. Call your output file competition.txt
Write a C++ program which perform the following:
1.Create a Class Sequence
2.Create a Private Static Data Member and initialize it with value zero
3.Create a Public Static Member Function , funcStatic ( )to access the static data member
4.Now, access the static member function in Main(), and using Constructor print the following sequence: 0 1 3 6 10 15 21 28
You must design a COVID-19 screening application for your campus. The guards at each gate will screen the students . The capabilities and features of the application should include a choice between the following functions:
1. A screening survey which will allow guards to record the students’ screening data.
*No student should be allowed access to the campus after 12h00 in the afternoons regardless of whether capacity has been reached or not.
*If a student’s temperature is 38 degrees or more, they will not be allowed entry into the campus.
1.Make use of parrel arrays and write the pseudocode that will accurately represent the application you are designing.
Given a string, write a program to re-arrange all the numbers appearing in the string in decreasing order. Note: There will not be any negative numbers or numbers with decimal part.