#include#include#includeusing namespace std;// outputHtmlTitle// parameters// This function...void outputHtmlTitle(ofstream & fout, string title){fout << "" << endl;fout << "" << endl;fout << "" << endl;fout << "" << endl;fout << title << endl;fout << "" << endl;}void outputHtmlFooter(ofstream & fout){fout << "" << endl;fout << "" << endl;}void outputHtmlList(ostream & fout, string first, string second, string third){fout << "" << endl;fout << "\t" << first << "" << endl;fout << "\t" << second << "" << endl;fout << "\t" << third << "" << endl;fout << "\t" << endl;}void main(int argc, char * *argv){ofstream htmlFile("myIntro.html");string title;cout << "Please enter the title: ";getline(cin, title);outputHtmlTitle(htmlFile, title);string name;string course1, course2, course3;cout << "Please enter your name: ";getline(cin, name);htmlFile << "" << "My name is " << name << "" << endl;cout << "Please enter 3 courses you are taking; one per line" << endl;getline(cin, course1);getline(cin, course2);getline(cin, course3);htmlFile << "" << "This semester I am taking: " << "" << endl;outputHtmlList(htmlFile, course1, course2, course3);outputHtmlFooter(htmlFile);}Question: Modify the program so that the user can enter as many courses as they want. The final result is a web page that can be displayed in a browser.

Question

#include
#include
#include

using namespace std;

// outputHtmlTitle
// parameters
// This function...
void outputHtmlTitle(ofstream & fout, string title){
fout << "" << endl;
fout << "" << endl;
fout << "" << endl;
fout << "" << endl;
fout << title << endl;
fout << "" << endl;
}

void outputHtmlFooter(ofstream & fout){
fout << "" << endl;
fout << "" << endl;
}

void outputHtmlList(ostream & fout, string first, string second, string third){
fout << "" << endl;
fout << "\t" << first << "" << endl;
fout << "\t" << second << "" << endl;
fout << "\t" << third << "" << endl;
fout << "\t" << endl;
}

void main(int argc, char * *argv){
ofstream htmlFile("myIntro.html");
string title;

cout << "Please enter the title: ";
getline(cin, title);
outputHtmlTitle(htmlFile, title);

string name;
string course1, course2, course3;

cout << "Please enter your name: ";
getline(cin, name);

htmlFile << "

" << "My name is " << name << "" << endl;

cout << "Please enter 3 courses you are taking; one per line" << endl;

getline(cin, course1);
getline(cin, course2);
getline(cin, course3);

htmlFile << "

" << "This semester I am taking: " << "" << endl;

outputHtmlList(htmlFile, course1, course2, course3);

outputHtmlFooter(htmlFile);

}

Question: Modify the program so that the user can enter as many courses as they want. The final result is a web page that can be displayed in a browser.

Expert Answer

Want to see the step-by-step answer?

Check out a sample Q&A here.

Want to see this answer and more?

Experts are waiting 24/7 to provide step-by-step solutions in as fast as 30 minutes!*

*Response times may vary by subject and question complexity. Median response time is 34 minutes for paid subscribers and may be longer for promotional offers.
Tagged in
Engineering
Computer Science

Related Computer Science Q&A

Find answers to questions asked by students like you.

Q: I am struggling on storing numbers from the getChoice () function into an array and pulling it back ...

A: Click to see the answer

Q: Consider the following procedure: procedure mystery (x, y, z); integer x, y, z;beginz = 2; y= z+x;en...

A: Solution:Pass by name:Pass by name is a mechanism which is used by Algol programming language that e...

Q: Knapsack Problem This exercise is due Tuesday, May 14. It has to be turned in on time in order to ge...

A: Instructions for completing the table:Enter 0 where objects and weights are zero.For each row assume...

Q: Develop the ‘Shape’ application such that: Implement an array of objects of various types (all SIX ...

A: Program plan: Define a class called “Shape”.Define a default constructor to print the message.Define...

Q: import java.util.*;public class TestAverage {public static void main(String[] args) {int test1, test...

A: Click to see the answer

Q: Describe, in English, the language defined by the following grammar in BNF (start symbol is ):

A: Solution:The given grammar is,&lt;S&gt; :: = &lt;A&gt; |&lt;B&gt;&lt;C&gt; :: = a | c&lt;A&gt; :: = ...

Q: what is the most cheapest firewall

A: Firewalls provide security to the network by monitoring and controlling the network traffic. It crea...

Q: how to to assign charather to perform additions (+), subtractions (-), multiplications (*), division...

A: Program plan:Include necessary header files.Declare the “namespace”.Define the “main()” function.Dec...

Q: Cell Phones Records In this part, you are required to write a program, using linked lists, that man...

A: In the given question, some parts of the question are missing to use linked lists.Here, I have creat...

Q: I was asked to add the three types of comments to this class, each consisting of the same statement ...

A: Java documentation comment: This comment is used to create documentation API. The syntax for this co...

Q: For problem 10RQ for Business Informaiton Systems book by Paige Baltzan, the question asked what is ...

A: The terms Collective intelligence, Knowledge management and Crowdsourcing are related to each other ...

Q: I am stuck trying to create a program in PYTHON that calculates the coins needed to make change for ...

A: We know penny=1 cent, nickel=5 cents, dime=10 cents and quarter=25 cents.Now for example if we have ...

Q: One acre of land is equivalent to 43,560 square feet. Write a program that calculates the number of ...

A: The algorithm for the program is as follows:Accept input string as the square feetCalculate the numb...

Q: Concentric circle(15) NUM_CIRCLE=15 OFFSET=15 pensize(innercircle)=5 pensize (outercircle)=2 Circle ...

A: Instructions to draw concentric circles:Initialize NUM_CIRCLE and OFFSET to 15. And, create a turtle...

Q: C++ Thanks!Example:"apple"-&gt;NULLreturn "apple"-&gt;NULL"apple"-&gt;"apple"-&gt;NULLreturn "apple"...

A: So in the fisrt step we will make the current node value is head.node* current = head;

Q: Please trace the code and give the correct output

A: Program Instructions:After adding the necessary cstring header file and formatting the output, the p...

Q: Write a class in java with the name AgeMessages , which does the following:a. Ask the user to enter...

A: The algorithm for the program would be as below:Declare one float variable for accepting user inputP...

Q: What would the output be when the user taps or clicks the btnDrivingAge button   Private Sub btnDri...

A: Form1:

Q: I was asked to add the three types of comments to this class, each consisting of the same statement ...

A: Java documentation comment: This comment is used to create documentation API. The syntax for this co...

Q: create a file in c++. Download the attached CreateRandomNumbersFile.cpp file, open it in Dev C++, an...

A: Program Instructions:Include necessary header files, declare local variables, and display a hello me...

Q: Consider the following procedure: procedure mystery (x, y, z); integer x, y, z;beginz = 2; y= z+x;en...

A: Pass by value copies the value of argument and passes it to the parameter. Hence, the final value of...

Q: Write a program called StudentTable that prints the below table. Use only print() orprintf(). DO NOT...

A: The program in Java would be using print and printf statements with formatting for left alignment of...

Q: Consider the following segment of code:procedure Mvar x: integer;procedure A (c: integer)var a, b: i...

A: Instructions for drawing the runtime stack (at “a:= c-d;”):The stack includes the activation records...

Q: Help.

A: Below is the algorithm:-startfunction rotate4ints(i,j,k,m)declare integer temp1=ii=mdeclare integer ...

Q: Find an nfa that accepts the complement from L (ab∗aa + bba∗ab)?

A: Solution:The following graph indicates the NFA (Non-deterministic finite automata) is given below:M ...

Q: My assignment wants me to program the hailstone series. I have done that, but my program isn't execu...

A: To input integer value into a string you need to use stringstream class which is declared in sstream...

Q: how to put a picture to top right corner in HTML

A: HTML stands for Hypertext markup language and is mainly used to format web pages and web sites. Html...

Q: Eliminate all λ-productions from S → AaB|aaB, A → λ, B → bbA|λ.

A: A procedure of removing all λ productions is as follows:

Q: Draw a full-adder using only NAND gates.

A: The full adder circuit with NAND gates is shown below.  It is a simple 1 bit adder.

Q: Write a class named StockPrice. The class constructor should accept an array of stock prices as its ...

A: First of all ,you  need to create a class .The class name is StockPrice  in which you need to create...

Q: Write a program in Eclipse that prompts the user for first name, last name, then secret number. The ...

A: Program plan:Include the required header file.Define the class “Main”.Define the “defaultInfo” metho...

Q: Which of the following is not included in a ScreenTip for command? a. Link to a help topic on the co...

A: ScreenTip:ScreenTip is a User Interface feature.It is a small popup window appears while the mouse c...

Q: I need guidance on this, more so what direction do I take to append to a string and make sure it is ...

A: To append the character "D" and "A" into string you can use append(); function of string class.  As ...

Q: I am trying ro create this java program , i have the table in my tatabase . I am using postgresql ii...

A: Program Instructions:Add the postgresql jar file in your project library.Create a database and a tab...

Q: Design a payroll program that prompts user enter an employee's hourly pay rate and the number of hou...

A: Since nothing is mentioned about the programming language to be used, Java has been used as it is on...

Q: (Method Overloading) Given the following methods, write down the printed output of themethod calls: ...

A: Answer with Explanation:“doSomething(5)” contains an argument integer “5” and it is called to the “d...

Q: Question: Write a function to display a pattern as follows: 1 2       1 ... ... n       n-1         ...

A: Solution:The python program has the following algorithm:In the displayPattern() function,Declare and...

Q: Construct the XOR operator using only AND, OR, and NOT gates.

A: XOR gate:An XOR gate is referred to an Exclusive OR gate. The output of an XOR gate is “1” only when...

Q: Define a class called Player that implements Comparable &lt;Player&gt; with health and name attribut...

A: The question posed here is an extremely long and complex one, so we have judiciously attempted to pr...

Q: How can I use a logic gate to test if two numbers are equal?

A: The “Exclusive-NOR” gate is a combination of the Exclusive-OR gate and the NOT gate.

Q: Write two scnr.nextInt statements to get the input values into birthMonth and birthYear.Then write a...

A: Given below is the program to get input values for month and year and write the output value as a mo...

Q: how to write a function in python 3 using for loop that counts how many times a consonant (either lo...

A: Note: The given program is compiled and executed in "repl.it" online compiler.

Q: Write a complete C++ program that randomly generates 20 integers between the rangeof 1 to 50 and sto...

A: The random number is generated by using rand() function from stdlib.h and in order to generate a new...

Q: Design a program that prompts user enters user name and password. Until user entered user name as "F...

A: Note:The programming language is not mentioned in the question. So, it is programmed in Java.Step by...

Q: Write a GUI application that calculates a car’s gas mileage. The application should let the user ent...

A: Program plan:Test.javaImport the required header filesDefine “Test” classCreate an object for the “M...

Q: • Write a program in Eclipse that computes future investment value at a given interest rate for a sp...

A: Program plan:Import necessary packages.Define a class named “Investment”.Define a method named “comp...

Q: I need to be find the result of typing: len("Grand Hotel" [:6] . rstrip()) into Python. I constantly...

A: To find the result of the statement len("Grand Hotel" [:6] . rstrip()), you need to use print() func...

Q: need help with understanding how to do the SQL code for the following question:  These are the heade...

A: As the table name is not shown in the picture, we are assuming the table name as Product. There are ...

Q: EXAMPLE:Suppose we have the following weighted intervals. start   finish   weight  11       14      ...

A: First, sort the given intervals by finish time.Next, the p-value for each record is calculated by fi...

Q: AskForNumbers Declare an integer array locally with the size of 200. Create a program that asks the ...

A: In order to implement the question mentions a method called getChoice() information about which has ...