subject

In this program you will be working with 2 arrays. One array is an array of 20 strings. This array holds the names of the colleges that have been the football National Champions from 2018 back to 1999. The second array will hold a list of twenty integers. You will use this array for the years. I have given you some of the beginning code to help you get started and so that you won't have to type in the long array. I suggest that you work on this program one section at a time and get each part working before moving on to the next. Your tasks for this assignment:
Fill in the missing parts of the program header and supply the names for the variables indicated
Print out the years from largest to smallest along with the National Champion team. I’ve provided this loop to you as an example. You can use the formatting that I have or you can change it to something that you like better, as long as the information is correct and easy for the user to read.
Print out the years from smallest to largest along with the National Champion team. Be sure that your formatting is consistent with whatever you used in the previous section.
Now you will notice that the two lists appear to be one long list. Create a break between the lists, using something that will add visual appeal. One example would be a row of stars surrounded by one or more blank lines above it and below it.
Create one or more loops that will go through the array(s) to count and display on separate rows the number of times that each of the following schools have been the National Champions: Alabama, Clemson, Texas. Be sure that the output will have meaning to the user. (Don’t just display 5, 2, 1.)
Create a loop that will go through the array(s) to determine and display which team held the title of National Champions in 2006. Again, be sure that your output will have meaning to the user.
//Chapter 7 Programming problem
#include
#include //What should you include here in order to use strings?
using namespace std;
int main()
{
//declare arrays
string team[20] = {"Clemson", "Alabama", "Clemson", "Alabama", "Ohio State",
"Florida State", "Alabama", "Alabama", "Auburn", "Alabama", "Florida", "Louisiana
State", "Florida", "Texas", "Southern California", "Louisiana State", "Ohio State",
"Miami", "Oklahoma", "Florida State"};
int year[20];
//Variable to hold the number of Clemson wins
//Variable to hold the number of Alabama wins
//Variable to hold the number of Texas wins
for (int count = 0; count <20; count++)
{
year[count] = 2018 - count;
cout << year[count] << "";
cout << team[count]<< endl;
}

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 17:40
Write a modular program (no classes yet, just from what you learned last year), that allows two players to play a game of tic-tac-toe. use a two-dimensional char array with 3 rows and 3 columns as the game board. each element of the array should be initialized with an asterisk (*). the program should display the initial board configuration and then start a loop that does the following: allow player 1 to select a location on the board for an x by entering a row and column number. then redisplay the board with an x replacing the * in the chosen location. if there is no winner yet and the board is not yet full, allow player 2 to select a location on the board for an o by entering a row and column number. then redisplay the board with an o replacing the * in the chosen location. the loop should continue until a player has won or a tie has occurred, then display a message indicating who won, or reporting that a tie occurred. player 1 wins when there are three xs in a row, a column, or a diagonal on the game board. player 2 wins when there are three ox in a row, a column, or a diagonal on the game board. a tie occurs when all of the locations on the board are full, but there is no winner. input validation: only allow legal moves to be entered. the row must be 1, 2, or 3. the column must be 1, 2 3. the (row, column) position entered must currently be empty (i.e., still have an asterisk in it).
Answers: 1
question
Computers and Technology, 22.06.2019 19:00
How is the number 110 written when expanded out to place values in the base 2 (binary) number system? options: 2 x 4 + 3 x 2 + 4 x 1 1 x 2 + 1 x 2 + 0 x 2 1 x 100 + 1 x 10 + 0 x 1 1 x 4 + 1 x 2 + 0 x 1
Answers: 1
question
Computers and Technology, 22.06.2019 19:10
How might the success of your campaign be affected if you haven’t carefully completed all field data or if you accidentally insert the wrong merge field in the document?
Answers: 1
question
Computers and Technology, 22.06.2019 21:30
How do you take a green screen out of the video while editing?
Answers: 2
You know the right answer?
In this program you will be working with 2 arrays. One array is an array of 20 strings. This array h...
Questions
question
Social Studies, 29.05.2020 21:07
question
Mathematics, 29.05.2020 21:07
Questions on the website: 13722367