C+ Programing Declaration

2. Given the following declaration and definition of a structure:

struct computer {
float cost;
int year;
int cpu_speed;
char cpu_type[16];
} model;

Write a program to display the initial values held by the structure (you must use a structure) on the screen.

3. When you enter the following data:

Enter the year: 1996
Enter the cost: $1234.56
Enter the CPU type: Pentium
Enter the CPU speed: 100MHz

4. Your output will look like this:

The type of the CPU inside your computer is: Pentium
The speed (MHz) of the CPU is: 100
The year that your computer was made: 1996
You paid : $1234.56 for your computer

© SolutionLibrary Inc. solutionlibary.com 9836dcf9d7 https://solutionlibrary.com/computer-science/software-development/c-programing-declaration-7dqg