Purchase Solution

C+ Programing Declaration

Not what you're looking for?

Ask Custom Question

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

Purchase this Solution

Solution Summary

The expert writes a program to display the initial values held by the structures on a screen using the C++ program.

Purchase this Solution


Free BrainMass Quizzes
Java loops

This quiz checks your knowledge of for and while loops in Java. For and while loops are essential building blocks for all Java programs. Having a solid understanding of these constructs is critical for success in programming Java.

Basic UNIX commands

Use this quiz to check your knowledge of a few common UNIX commands. The quiz covers some of the most essential UNIX commands and their basic usage. If you can pass this quiz then you are clearly on your way to becoming an effective UNIX command line user.

Inserting and deleting in a linked list

This quiz tests your understanding of how to insert and delete elements in a linked list. Understanding of the use of linked lists, and the related performance aspects, is an important fundamental skill of computer science data structures.

Javscript Basics

Quiz on basics of javascript programming language.

Word 2010: Tables

Have you never worked with Tables in Word 2010? Maybe it has been a while since you have used a Table in Word and you need to brush up on your skills. Several keywords and popular options are discussed as you go through this quiz.