Question
Assume the definition of Exercise 2 , which defines the struct computerType. Write a program that declares a variable of type computerType, prompts the user
Assume the definition of Exercise 2, which defines the struct computerType. Write a program that declares a variable of type computerType, prompts the user to input data about a computer, and outputs the computers data.
Example input and output is shown below:
Enter the name of the manufacturer: McPC Enter the model of the computer: 1000 Enter processor type: Intel GFX Enter the size of RAM (in GB): 8 Enter the size of hard drive (in GB): 1000 Enter the year the computer was built: 2016 Enter the price: 1200 Manufacturer: McPC Model: 1000 Processor: Intel GFX Ram: 8 Hard Drive Size: 1000 Year Built: 2016 Price: $1200.00
Instructions from Exercise 2 have been posted below for your convenience.
Exercise 2
Define a struct computerType to store the following data about a computer: Manufacturer (string), model type (string), processor type (string), ram (int) in GB, hard drive size (int) in GB, year when the computer was built (int), and the price (double).
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started