Home / Expert Answers / Computer Science / this-is-c-you-39-ve-been-hired-by-data-processor-to-edit-a-c-console-application-that-displays-fiv-pa553

(Solved): this is C++ You've been hired by Data processor to edit a C++ console application that displays fiv ...



this is C++

You've been hired by Data processor to edit a C++ console application that
displays five data types in C++ and their corresponding size in bytes and
description. Download file Lab01-01.cpp which contains the code to be edited.
Create a C++ console application project in Visual Studio or another tool. Add the
downloaded source code file to the project, or copy its contents to a project source
code file. See documents Using Visual Studio and C++ or Using Xcode and
C++ on Canvas if using one of those tools. Make the following edits to the code
file:

1) Add a header comment and 2-3 body comments as seen in the C++
template on Canvas.
2) The cout statements write information to the screen. Modify the
information within the double quotes so that it appears on the screen in three
columns and under the correct column headings. You only need to add
spaces in the appropriate spots to align the information under the headings.
The data types should be left-justified within their column, and sizes and
descriptions should be right-justified within their two columns.

the C++ file

#include <cstdlib> // For several general-purpose functions

#include <fstream> // For file handling

#include <iomanip> // For formatted output

#include <iostream> // For cin, cout, and system

#include <string> // For string data type

using namespace std; // So "std::cout" may be abbreviated to "cout"

int main()

{

cout << "Welcome to Data processor" << endl;

cout << "------------------------------" << endl << endl;

cout << "Data-type Size(bytes) Description" << endl << endl;

cout << "int 4 Stores whole numbers, without decimals" << endl;

cout << "float 4 Stores fractional numbers, containing one or more decimals." << endl;

cout << "double 8 Stores fractional numbers, containing one or more decimals" << endl;

cout << "boolean 1 Stores true or false values " << endl;

cout << "char 1 Stores a single character/letter/number, or ASCII values" << endl;

cout << "End of Data processor " << endl;

}




We have an Answer from Expert

View Expert Answer

Expert Answer



I have added...
We have an Answer from Expert

Buy This Answer $5

Place Order

We Provide Services Across The Globe