Question

In: Computer Science

C++ Using what you know about how to take inputs and make outputs to the console,...

C++
Using what you know about how to take inputs and make outputs to the console, create a check printing application. Your application will read in from the user an employee's name and salary, and print out a Console Check similar to the following.

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

> | $1,000,000 | >

> >

> ___Pay to the Order of___ Johnny PayCheck >

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

Solutions

Expert Solution

If you have any doubts, please give me comment...

#include<iostream>

#include<sstream>

#include<iomanip>

#include<string>

#include<locale>

using namespace std;

int main(){

    string name;

    double salary;

    cout<<"Employee Name: ";

    cin>>name;

    cout<<"Employee Salary: ";

    cin>>salary;

    int len = name.size();

    std::stringstream ss;

    ss.imbue(std::locale(""));

    ss << std::fixed <<setprecision(2)<<fixed<< salary;

    cout<<setw(39+len)<<setfill('>')<<">"<<endl;

    cout<<setfill(' ')<<"> | $"<<setw(31+len)<<left<<ss.str()<<"| >"<<endl;

    cout<<">"<<setw(37+len)<<" "<<">"<<endl;

    cout<<"> ___Pay to the Order of___ "<<name<<" PayCheck >"<<endl;

    cout<<setw(39+name.size())<<setfill('>')<<">"<<endl;

    return 0;

}


Related Solutions

Using what you know about how to take inputs and make outputs to the console, create...
Using what you know about how to take inputs and make outputs to the console, create a check printing application. Your application will read in from the user an employee's name and salary, and print out a Console Check similar to the following. >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> > | $1,000,000 | > > > > ___Pay to the Order of___ Johnny PayCheck > >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Please only use technique from chapter 1 through 3 in C++ from control structure through object 9th edition
C++ Using what you know about inputs and outputs, code a simple ATM interaction. Your ATM...
C++ Using what you know about inputs and outputs, code a simple ATM interaction. Your ATM will start with only $500 to give out, and YOUR balance will be 1000. The amounts the ATM can dispense are $40, $80, $200 and $400. After you've received your disbursement, the console will show the amount you have left in your account, as well as how much the ATM has to dispense (we live in a small, fictional town - no one will...
Explain the inputs (and outputs if you know them) of the following Excel functions: • Norm.S.Dist()....
Explain the inputs (and outputs if you know them) of the following Excel functions: • Norm.S.Dist(). • Norm.Inv(). • T.Dist().
with C# create a console application project that outputs the number of bytes in memory that...
with C# create a console application project that outputs the number of bytes in memory that each of the following number types use, and the minimum and maximum values they can have: sbyte, byte, short, ushort, int, uint, long, ulong, float, double, and decimal. Try formatting the values into a nice-looking table! More Information: You can always read the documentation, available at https://docs.microsoft.com/en-us/dotnet/standard/base-types/composite-formatting for Composite Formatting to learn how to align text in a console application. Your output should look...
C# Create a console application project that outputs the number of bytes in memory that each...
C# Create a console application project that outputs the number of bytes in memory that each of the following number types use, and the minimum and maximum values they can have: sbyte, byte, short, ushort, int, uint, long, ulong, float, double, and decimal. Try formatting the values into a nice-looking table! Your output should look something like this: | Type | Bytes of Memory | Min | Max |
This is a question on the inputs and outputs on Basic javascript application What is the...
This is a question on the inputs and outputs on Basic javascript application What is the displayed output of the application if the user inputs Are: 1    in the first box, 2 in the second box, 3 in the third box, and 4 in the fourth box Modify the HTML and javascript file in order to Creates an h1 and a span element ii)          Accesses all the html elements, then adds the four input values as strings and sends the...
Code in C Write a program whose inputs are three integers, and whose outputs are the...
Code in C Write a program whose inputs are three integers, and whose outputs are the largest of the three values and the smallest of the three values. Ex: If the input is: 7 15 3 the output is: largest: 15 smallest: 3 Your program must define and call the following two functions. The LargestNumber function should return the largest number of the three input values. The SmallestNumber function should return the smallest number of the three input values. int...
What are the outputs of the "Define activity phase" and the inputs to the "Sequence activity...
What are the outputs of the "Define activity phase" and the inputs to the "Sequence activity phase" in the project time management? Explain why the schedule produced by the Sequence activity phase cannot be used as a reference to manage the time of the project
For each of the following problems provide: a. inputs b. outputs c. error conditions d. an...
For each of the following problems provide: a. inputs b. outputs c. error conditions d. an algorithm using the pseudocode reference used in class e. a set of test cases. Be careful about corner cases f. the minimum number of operations executed in your algorithm g. the maximum number of operations executed in your algorithm Q. Train Ticket for one person. Read a person’s age, then compute and display the price the person needs to pay for the train ride...
Must make a "Calculator" using C. The calculator must subtract, add, divide, and multiply inputs, and...
Must make a "Calculator" using C. The calculator must subtract, add, divide, and multiply inputs, and tell whether a number is prime or not. The user chooses how many inputs go into the calculator. For example, the code will ask the user what function they want. If the user chooses to subtract, the the code will then ask the user how many numbers they want to subtract. After, the code will ask the user to input as many numbers as...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT