Explore BrainMass
Share

Explore BrainMass

    C+ Programing Declaration

    This content was COPIED from BrainMass.com - View the original, and get the already-completed solution here!

    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

    © BrainMass Inc. brainmass.com October 9, 2019, 11:04 pm ad1c9bdddf
    https://brainmass.com/computer-science/cpu-utilisation/c-programing-declaration-243536

    Solution Summary

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

    $2.19