599 Answered Questions for the topic C++
04/29/21
Determining If a Student Should Be on Probation Due to Their GPA (C++ Program)
A student is put on probation if their GPA is below 2.0. Complete the Course class by implementing the CountProbation() member function, which returns the number of students with a GPA below...
more
04/27/21
All To Upper. Read a string from cin into word and modify it so that it has all uppercase letters.
Read a string from cin into word and modify it so that it has all uppercase letters.Samples:
Input: hello Output: HELLO
Input: h3Llo Output: H3LLO
Hints:
You can only change the code in the...
more
04/27/21
Count E's. Read in a string, print out the number of e's in it.
Read in a string, print out the number of e's in it. Note that the string may have spaces in it. A call to getline looks like getline(cin, myVariable) where myVariable is a string variable that...
more
04/26/21
Web Log Parser. Submit to elearn: Make sure to name files EXACTLY as specified - including capitalization. Do not submit extra files. Do not zip or otherwise compress files unless told to.
ObjectiveYouwill be able to read data from a file and use string functions to process text.Assignment InstructionsShould be able to compile and run your program with:
g++ -std=c++11 assign5.cpp -o...
more
04/26/21
Tag Remover. Read in a string that may have spaces (use getline!).
Read in a string that may have spaces (use getline!). In the string will be something that looks like [TAG]text inside tag[/TAG] where TAG can be any string. Print out the TAG, a colon, and the...
more
04/26/21
Sher. Write a word shortener.
Write a word shortener. Read in a string (you may assume no spaces). If it is 4 characters or less, print it back out. If it is more than 4 characters, print just the first two followed by the last...
more
04/26/21
Caturday Check. Read a string (will not have spaces).
Read a string (will not have spaces). Print "true" if the word "cat" appears starting at the first or second letter. Otherwise print false.Samples:
Input: catch Output: true
Input: scatter ...
more
04/26/21
First Middle Last Letter. Read in a string from cin (it will not have any whitespace).
Read in a string from cin (it will not have any whitespace). Print out the first character, middle character (if string is an even length, print the second of the two middle letters), and last...
more
04/26/21
All To Upper. Read a string from cin into word and modify it so that it has all uppercase letters.
Read a string from cin into word and modify it so that it has all uppercase letters.Samples:
Input: hello Output: HELLO
Input: h3Llo Output: H3LLO
Hints:
You can only change the code in the...
more
04/26/21
String Compactor. Write code that will read in a string and then print out every other character of the string.
Write code that will read in a string and then print out every other character of the string. You should use getline to read in the string... it may have spaces.Samples:
Input of "Hello" should...
more
04/26/21
Count E's. Read in a string, print out the number of e's in it.
Read in a string, print out the number of e's in it. Note that the string may have spaces in it. A call to getline looks like getline(cin, myVariable) where myVariable is a string variable that...
more
04/19/21
Read Text. Write a program that reads one character at a time and prints them out without spaces until it hits a period. Do not print the period.
Write a program that reads one character at a time and prints them out without spaces until it hits a period. Do not print the period.Input of:H e l l o .should result in output...
more
04/19/21
Squares Adder. Write a program that reads in a number (integer) indicating how many values you are to read.
Write a program that reads in a number (integer) indicating how many values you are to read. Then read in that many more numbers (all integers) and output the sum of their squares.Input of 4 1 2 3...
more
04/19/21
Counting 3. Write a program that reads in two chars, like B and F and prints all the characters in that range in the format:
Write a program that reads in two chars, like B and F and prints all the characters in that range in the format:B,C,D,E,FHints:
Your loop variable should be a char. Remember you can add one to a...
more
04/19/21
Counting 2. Read in three numbers. A start value, an increment value, and an end value (all integers). Start counting from the start, adding the increment at each step...
Read in three numbers. A start value, an increment value, and an end value (all integers). Start counting from the start, adding the increment at each step, until you are at or above the end...
more
04/19/21
Counting 1. Write a program that reads in a number, and writes out from 1 to that number. An input of 5 would produce 12345.
Write a program that reads in a number, and writes out from 1 to that number. An input of 5 would produce 12345.Code:#include <iostream>using namespace std;int main(){ //YOUR_CODE}
04/19/21
Cell Labeler. In a spreadsheet, the rows are numbered and the columns are lettered, like this:
In a spreadsheet, the rows are numbered and the columns are lettered, like this:
ABC
1
A1
B1
C1
2
A2
B2
C2
The code below reads in a number of rows and columns. Prints out the cells that would...
more
04/19/21
Triangle Printer 2. The existing code reads in a number and prints a series of rows. Modify it so it prints a triangle that looks like the ones shown below.
The existing code reads in a number and prints a series of rows. Modify it so it prints a triangle that looks like the ones shown below.
SizeShape
1
*2
*
**
3
*
**
***
4
*
**
...
more
04/19/21
Triangle Printer. The existing code reads in a number and prints a column of stars that many rows long. Modify it so that it prints a triangle that looks like the one shown below.
The existing code reads in a number and prints a column of stars that many rows long. Modify it so that it prints a triangle that looks like the one shown...
more
04/19/21
Square printer. Read in an integer. Print a square of *'s that height and width. An input of 3 should produce:
Read in an integer. Print a square of *'s that height and width. An input of 3 should produce:
***
***
***
An input of 5 should produce:
*****
*****
*****
*****
*****
Code:#include...
more
C++
04/18/21
Parsing Dates C++
Complete main() to read dates from input, one date per line. Each date's format must be as follows: March 1, 1990. Any date not following that format is incorrect and should be ignored. Use the...
more
04/15/21
I need the implementations for all the classes in this project in C++
This is the link to all the instructions to the project, there should be a Shape class as the abstract parent class and circle, triangle, rectangle children classes which inherit from shape. Should...
more
04/14/21
Implement an abstract parent Shape class and its polymorphic children Circle, Rectangle, and Triangle.
Your objective for this project is to implement an abstract parent Shape class and its polymorphic children Circle, Rectangle, and Triangle. Shape is a 2D character array which requires the use of...
more
04/14/21
Implement an abstract parent Shape class and its polymorphic children Circle, Rectangle, and Triangle
Your objective for this project is to implement an abstract parent Shape class and its polymorphic children Circle, Rectangle, and Triangle. Shape is a 2D character array which requires the use of...
more
04/13/21
Catapult Calculator
Market research has indicated that the app store currently lacks a catapult calculator. Filling this void could be the get rich opportunity of a lifetime! Write a program that calculates whether a...
more
Still looking for help? Get the right answer, fast.
Ask a question for free
Get a free answer to a quick problem.
Most questions answered within 4 hours.
OR
Find an Online Tutor Now
Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.