Question: Can someone please help me figure out what I'm doing incorrect? I've provided a copy of the problem I'm working on right now, along with

Can someone please help me figure out what I'm doing incorrect? I've provided a copy of the problem I'm working on right now, along with the work I've done so far, and I cant seem to figure out what it is that I'm doing wrong. Been working on it for the past 3 days now but everything I've tried seems to be wrong. Please help me to learn more about strings and what is wrong with it.

Problem:

Can someone please help me figure out what I'm doing incorrect? I've

HERE IS MY WORK (Note all my work is shown for C++):

#include

#include

#include

#include

using namespace std;

int main()

{

double DensityTwo,DensityOne, J,N;

string NameOne,NameTwo;

cout

getline(cin, NameOne,' ');

N = NameOne;

cout

cin >> DensityOne;

cout

getline(cin, NameTwo,' ');

J = NameTwo;

cout

cin >> DensityTwo;

cout

cout

cout

cout

return 0;

}

C) Formatted Table: Wrnte a program to print a small formatted table showing material and densty according to the following specifications Prompt the user to enter the names of two materials and their densities. Use the densities from the table provided below. Read the material names as strings. Print 2 tables similar to the output shown below, but use lead and steel for the materials o Table 1: Use the following formatting . Left justification 12 total spaces for each item in the table Fixed format " 8 digits after the decimal point " Show trailing zeros " The table heading should also be left justified o Table 2: Use the following formatting " Right justification " 18 total spaces for each item in the table - Scientific format " 4 digits after the decimal point " Show trailing zeros " The table heading should also be right justified

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!