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 19:30
Singing in the rain: this first part of the film shows the early history of motion picture. how accurate do you think the portrayal of the early motion picture industry is? why? is historical accuracy important in films and theater productions? explain.
Answers: 1
question
Computers and Technology, 23.06.2019 09:00
The first screen you see when you open word2016 what is called?
Answers: 1
question
Computers and Technology, 23.06.2019 15:00
In the blank libreoffice writer document, to start the process of entering a date field into a letter, click on the insert menu. edit menu. file menu. fields menu.
Answers: 3
question
Computers and Technology, 23.06.2019 15:30
The song about casey jones a railroad engineer who gives his life on the job would most likely gall under the folk song category of? a-work song b-nonsense song c-religious song d-ballad
Answers: 1
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
English, 12.09.2020 01:01
question
English, 12.09.2020 01:01
question
History, 12.09.2020 01:01
question
Social Studies, 12.09.2020 01:01
question
History, 12.09.2020 01:01
question
Mathematics, 12.09.2020 01:01
question
Mathematics, 12.09.2020 01:01
question
Mathematics, 12.09.2020 01:01
question
Mathematics, 12.09.2020 01:01
question
Mathematics, 12.09.2020 01:01
question
Mathematics, 12.09.2020 01:01
question
Chemistry, 12.09.2020 01:01
question
Biology, 12.09.2020 01:01
question
Social Studies, 12.09.2020 01:01
question
Mathematics, 12.09.2020 01:01
question
Mathematics, 12.09.2020 01:01
question
Chemistry, 12.09.2020 01:01
question
History, 12.09.2020 01:01
question
Mathematics, 12.09.2020 01:01
question
Mathematics, 12.09.2020 01:01
Questions on the website: 13722367