a) Write the C++ statements for following tasks: Declare a struct name GameRecord The members are game Id duration (in minutes) and score .Each game consists of 3 rounds with different score. Therefore, score should be able to store 3 values. i. Create a variable name SportGame of type GameRecord. Assign the following value to the SportGame record : ii. game Id : G1001 | duration : 40 Round 1 Round 2 Round 3 45 37 55 score iii. Calculate the total score from SportGame record by using loop control structure.

Programming with Microsoft Visual Basic 2017
8th Edition
ISBN:9781337102124
Author:Diane Zak
Publisher:Diane Zak
Chapter10: Classes And Objects
Section: Chapter Questions
Problem 3MQ2
icon
Related questions
Question

C++ Programming

a) Write the C++ statements for following tasks:
Declare a struct name GameRecord. The members are gameId duration (in
1.
minutes) and score .Each game consists of 3 rounds with different score. Therefore,
score should be able to store 3 values.
Create a variable name SportGame of type GameRecord. Assign the following value to
11.
www
the SportGame record :
game Id : G1001|
duration : 40
Round 1
Round 2
Round 3
score
45
37
55
111.
Calculate the total score from sportGame record by using loop control structure.
Transcribed Image Text:a) Write the C++ statements for following tasks: Declare a struct name GameRecord. The members are gameId duration (in 1. minutes) and score .Each game consists of 3 rounds with different score. Therefore, score should be able to store 3 values. Create a variable name SportGame of type GameRecord. Assign the following value to 11. www the SportGame record : game Id : G1001| duration : 40 Round 1 Round 2 Round 3 score 45 37 55 111. Calculate the total score from sportGame record by using loop control structure.
Expert Solution
steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Knowledge Booster
Variables
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Programming with Microsoft Visual Basic 2017
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT