Program in C Language :
Define a struct computerType to store the following data about a computer: Manufacturer (50 character string), model type (50 character string), processor type (10 character string), ram (int) in GB, hard drive size (int) in GB, year when the computer was built (int), and the price (double).
Write a program that declares a variable of type computerType, prompts the user to the input data for the struct, and then outputs all the computer's data from the struct.
For Example:
Enter the name of the manufacturer: Dell Enter the model of the computer: Inspiron Enter processor type: I7 387 Enter the size of RAM (in GB): 32 Enter the size of hard drive (in GB): 512 Enter the year the computer was built: 1990 Enter the price: 1345.67 -------------------- Manufacturer: Dell Model: Inspiron Processor: I7 387 Ram: 32 Hard Drive Size: 512 Year Built: 1990 Price: $1345.67
Program screenshots:


Sample Output:

Code to copy:
// Declare the necessary header files.
#include <stdio.h>
// Declare the structure
struct computerType {
// Declare variables.
char manufacturer[50];
char model[50];
char processor[10];
int ram;
int hardDrive;
int year;
double price;
};
// Start the main function.
int main() {
struct computerType computer_Type;
// Prompt the user to enter details.
printf("Enter the name of the manufacturer: ");
fgets(computer_Type.manufacturer, 50, stdin);
printf("Enter the model of the computer: ");
fgets(computer_Type.model, 50, stdin);
printf("Enter processor type: ");
fgets(computer_Type.processor, 10, stdin);
printf("Enter the size of RAM (in GB): ");
scanf("%d", &(computer_Type.ram));
printf("Enter the size of hard drive (in GB): ");
scanf("%d", &(computer_Type.hardDrive));
printf("Enter the year the computer was built: ");
scanf("%d", &(computer_Type.year));
printf("Enter the price: ");
scanf("%lf", &(computer_Type.price));
printf("\n--------------------\n");
// Display the result on console.
printf("Manufacturer: %s", computer_Type.manufacturer);
printf("Model: %s", computer_Type.model);
printf("Processor: %s", computer_Type.processor);
printf("Ram: %d\n", computer_Type.ram);
printf("Hard Drive Size: %d\n", computer_Type.hardDrive);
printf("Year Built: %d\n", computer_Type.year);
printf("Price: $%.2lf\n", computer_Type.price);
return 0;
}
Program in C Language : Define a struct computerType to store the following data about a...
write a C++ program using classes, friend functions and overloaded operators. Computer class: Design a computer class (Computer) that describes a computer object. A computer has the following properties: Amount of Ram in GB (examples: 8, 16), defaults to 8. Hard drive size in GB (examples: 500, 1000), defaults to 500. Speed in GHz (examples: 1.6, 2.4), defaults to 1.6. Type (laptop, desktop), defaults to "desktop" Provide the following functions for the class: A default constructor (constructor with no parameters)...
What is wrong with this Code? Fix the code errors to run correctly without error. There are two parts for one code (one question) the two parts branch off, one part has 2 sheets of code, the other has 3 sheets of code, all are small code segments for one question. Pt.1 - 2 sheets of code: public class Computer { private String make; private String type; private String modelNumber; private double cpuSpeed_GHz; private int ramSize_GB; private int hardDriveSize_GB; private...
Write a program (C++) that shows Game sales. The program should use a structure to store the following data about the Game sale: Game company Type of Game (Action, Adventure, Sports etc.) Year of Sale Sale Price The program should use an array of at least 3 structures (3 variables of the same structure). It should let the user enter data into the array, change the contents of any element and display the data stored in the array. The program...
write a program that defines two different structures as follows: 1) A cPu structure that contains a manufacturers Name (string), a model number (int), a speed (float), and a price (float). a model number (int), 2) A Motherboard structure that contains a manufacturer's ID (int), and a price (float). Your program use arrays of each type of structure. All arrays wi contain a total of five will structures. Your program will also read in two separate files. You can obtain...
using C# language This program will demonstrate inheritance. Your Pizza Shop expands and now handles delivery orders and sit down orders in a restaurant setting. There are differences in a SeatedPizzaOrder and a DeliveryPizzaOrder. These are more specialized versions of the PizzaOrders you have been creating all along and you decide to write a program that handles them the same as much as possible and reuses the code of a general PizzaOrder class as much as possible to demonstrate inheritance....
# No plagiarism #Decide on the type of motherboard to use in the computer system you are designing. Explain what it is and why you chose it. This from Lab 5.1 Using the information you recorded previously in Step 5, consult Table 5-1 to find out how to enter your system’s setup utility. (Alternatively, when you first turn on your PC, look for a message on your screen, which might read something like “Press F2 to access setup.” Table 5-1:...
(20 marks) Read the following scenario and write a report according to the requirements: The Company you work for is purchasing brand new desktop computers to replace the old outdated ones that it has had in its offices. A local distributor has been contacted, requesting specifications of the types of PCs they offer for businesses. They have responded providing specifications for two different types of PCs. Your boss has requested that you write a report with your recommendations regarding which...
[C++]
Outline:
The movie data is read from a file into an array of structs and
is sorted using the Selection Sort method and the search is done
using the Binary Search algorithm with the year of release as key.
This assignment upgrades to an array of pointers to the database
elements and converts the Selection Sort and Binary search
procedure on the database to selection sort and binary search on
the array of pointers to the database.
Requirements:
Your...
I need help programming this question using C language. This program uses input data entered in command line at the same time when the command or .exe file is entered. They are called command-line arguments. Because everything entered in command line is taken as a string, these arguments including the command itself or the .exe file name are stored in an array of char pointers, each pointer points to the first character of a string (i.e., argument). The inputs can...
Please help we are suppose to explain what the C code does.
This is the electronics database
(6 pts) This problem is based on Electronics database. Add some annotations to the following table to explain what the C program is doing in detail. Note that "void" is how C declares a function that does not return anything. You are expected to generalize or research svntaxes not mentioned in the lecture C Program Annotation void newPCproduct EXEC SQL BEGIN DECLARE SECTION;...