Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C++, please provide comments Problem Statement: 1. The Roman numerals were adopted to clarify any confusion that may occur because the NFL Championship Game-the Super

C++, please provide comments image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
Problem Statement: 1. The Roman numerals were adopted to clarify any confusion that may occur because the NFL Championship Game-the Super Bowl - is played in the year following a chronologically recorded season. In Project 1 , you will write a program to represent the Super Bowl in Roman Numeral representation. This Lab assignment will help you solve one sub-problem of Project 1: complete and test the definition of the function, named roman_numeral, shown as follows: / Purpose: convert the integer n to its corresponding Roman Numeral n must be between 1 and 3999 it returns string form of the Roman Numeral @param n int: representing the number to convert into Roman Numeral Qreturn string: representing the corresponding Roman Numeral for n */ string roman_numeral(int n); (Please note that you can define other functions if you think you need to reuse the same block of code more than twice.) 2. Using the provided C++ code, Complete the definition of the function, named roman_numeral. Please note that if you want to define other functions, you always need to follow this rule: "functions cannot be called before they are declared." You may provide the complete definition of the function before calling it, or at least provide the function declaration (in function header) before calling it. If you have finished this function definition in your Project 1, you can simply copy the definition from Proje ct 1 to Lab 5, and try to compile the program. If you have not done it for Project 1, after you finish Lab 5, you can copy the definition to your Project 1. After passing the compilation, please test running your program. The output of your program should EXACTLY match the following sample output: \#include *include using namespace std; // if you want to define other functions, you can! //you should declare the function signature here, // then define the function later... //Returns a string form of a Roman Numeral. // (n must be between 1 and 3999) string roman_numeral (int n ) ; int main() \{ const int START SUPERBOWL =1967;// The first Super Bowl was hold in 1967 (at Los Angeles Memorial Coliseum) const int START =2000;// This program displays super Bowl starting in year 2000 const int END =2099; /f This progran displays Super Bonl ending in year 2099 // define the correct range for Roman Numerals: [MIN_ROMAN, MAX_ROMAN] const int MIN_ROMAN =1; const int MAX_ROMAN =3999; // The last super Bowl which can be represented by Roman Numerals would be: START_SUPERBOWL + MAX_ROMAN - 1; const int GROUP =10;// Layout the years in a group of 10 1/ display the first 100 years of super Bowl, starting at 1967 cout endl " \ tht \ tSuper Bow1 Records" endl; cout "The first Super Bowl was hold at Los Angeles Memorial Coliseum on January 15, " START_SUPERBOWL endl; cout "\tYearltltSuper Bow1" endl; for (int i= START; i>>>>>>m>>LXVLXVILXVIILXVIIILXIXLXXLXXILXXIILXXIII 2040mLXXIV2041mLXXV2042LXXVI2043LXXVII2044>LXXVIII2045>LXXIX2046LXXX2047LXXXI2048LXXXII2049>LXXXIII 2050205120522053205420552056205720582059>>>>>>>>>>LXXXIVLXXXVLXXXVILXXXVIILXXXVIIILXXXIXXCXCIXCIIXCIII 2060XCIV2061XCV2062xXCVI2063xXCVII2064>XCVIII2065XCIX2066C2067CI2068>CII 2069>CIII 2070207120722073207420752076207720782079>>>>>>>>>>CIVCVCVICVIICVIIICIXCXCXICXIICXIII 2080208120822083208420852086208720882089>>>>>>>>>>CXIVCXVCXVICXVIICXVIIICXIXCXXCXXICXXIICXXIII 2090209120922093209420952096209720982099>>>>>>>>>>CXXIVCXXVCXXVICXXVIICXXVIIICXXIXCXXXCXXXICXXXIICXXX

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

SQL Antipatterns Avoiding The Pitfalls Of Database Programming

Authors: Bill Karwin

1st Edition

1680508989, 978-1680508987

More Books

Students also viewed these Databases questions

Question

7. Explain why retirees may be valuable as part-time employees.

Answered: 1 week ago

Question

3. Provide advice on how to help a plateaued employee.

Answered: 1 week ago