#include <iostream> #include <fstream> #include <string> #include <iomanip> using namespace std; int main(){ ifstream infile; ofstream outfile; string firstname, lastname; double current_salary, percentage_increse; infile.open("test.txt"); outfile.open("ch3_Ex6Data.txt"); outfile << fixed << showpoint << setprecision(2); outfile << "Enther employee name: "; infile >> firstname >> lastname; outfile << endl; outfile << "enter employee salary and percentage change"; outfile << endl; infile >> current_salary >> percentage_increse; outfile << firstname << lastname << "the current salary is " << current_salary << "with a " << percentage_increse << "percent increse" << endl; infile.close(); outfile.close(); return 0; }
cin
cout
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)