Answered step by step
Verified Expert Solution
Link Copied!

Question

00
1 Approved Answer

I need help writing a program. I wrote a program similar to this using C-string functions, but I'm having a difficult time doing this with

I need help writing a program.

I wrote a program similar to this using C-string functions, but I'm having a difficult time doing this with string functions.

I'm also unable to get my program to check whether the team name has 1 or 2 words.(for example, my program only prints San instead of the whole name, which is San Francisco)

Please don't use vectors/structs for this program.image text in transcribed

Write a program to read the input file, shown below and write out the output file shown below. Use only string objects and string functions to process the data. Do not use c-string functions or stringstream (or istringstream or ostringstream) class objects for your solution Input File Cincinnati 27, Buffalo 24 Detroit 31, Cleveland 17 Kansas City 24, Oakland 7 Carolina 35, Minnesota 10 Pittsburgh 19, NY Jets 6 Philadelphia 31, Tampa Bay 20 Green Bay 19, Baltimore 17 St. Louis 38, Houston 13 Denver 35, Jacksonville 19 Seattle 20, Tennessee 13 New England 30, New Orleans 27 San Francisco 32, Arizona 20 Dallas 31, Washington 16 Output File Cincinnati over Buffalo 27 to 24 Detroit over Cleveland 31 to 17 Kansas City over Oakland 24 to 7 Carolina over Minnesota 35 to 10 Pittsburgh over NY Jets 19 to 6 Philadelphia over Tampa Bay 31 to 20 Green Bay over Baltimore 19 to 17 St. Louis over Houston 38 to 13 Denver over Jacksonville 35 to 19 Seattle over Tennessee 20 to 13 New England over New Orleans 30 to 27 San Francisco over Arizona 32 to 20 Dallas over Washington 31 to 16

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered 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

Students also viewed these Databases questions