QuestionQuestion

Transcribed TextTranscribed Text

An electrodialysis machine is a device that can filter impurities from water by running a current through various solutions and selectively permeable membranes. Through a particular series of experiments, it is found that for pure water alone, the voltage of the device (measured in Volts) is related to the current density 3 (measured in A/cm²) by the empirical fit: V = aln(bj - c). for 0.07. Here a = 0.12 V. b = 2.8 X 10° cm2/A, and c = -60. In this homework, we will write a simple program to prompt a user for 3 values of the current density in the range 0 to 0.07. separated by spaces, and then display a nicely formatted table of the results. Some notes about the formatting: 1. The widths of the left and right side correspond to the widths of the left and right labels, "Current [A/em^2] and "Voltage [VI", respectively. 2. The table numbers should be displayed with 3 digits of precision in the fixed format. 3. The data on the left should be right justified, and the data on the right should be left justified. Do not forget to comment your code. The program should execute in the following manner. You must make sure the output matches the format below perfectly. Enter three current densities in the range from o to 0.07 A/cm ^2 separated by spaces: [NUMBER] [NUMBER] [NUMBER] Here is your table: /Table goes here/ Enter three current densities in the range from 0 to 0.07 A/cm^2 separated by spaces: 0.009 1025 0.064 Here ic your table: Current: TA/cm^21:Unltage rul 0.009 12.045 0.025 2.168 0.064:2.280

Solution PreviewSolution Preview

These solutions may offer step-by-step problem-solving explanations or good writing examples that include modern styles of formatting and construction of bibliographies out of text citations and references. Students may use these solutions for personal skill-building and practice. Unethical use is strictly forbidden.

#include <cstdlib>
#include <iostream>
#include <cmath>
#include <iomanip>
using namespace std;

double voltage(double density);
/*
*
*/
int main(int argc, char** argv) {
   
    double densities[3];
    cout << "Enter three current densities in the range from 0 to 0.07 A/cm^2 separated by spaces: ";
    for (int i = 0; i < 3; i++) {
       cin >> densities[i];...

By purchasing this solution you'll be able to access the following files:
Solution.cpp.

$15.00
for this solution

or FREE if you
register a new account!

PayPal, G Pay, ApplePay, Amazon Pay, and all major credit cards accepted.

Find A Tutor

View available C-Family Programming Tutors

Get College Homework Help.

Are you sure you don't want to upload any files?

Fast tutor response requires as much info as possible.

Decision:
Upload a file
Continue without uploading

SUBMIT YOUR HOMEWORK
We couldn't find that subject.
Please select the best match from the list below.

We'll send you an email right away. If it's not in your inbox, check your spam folder.

  • 1
  • 2
  • 3
Live Chats