私はこのようなテーブルを作ろうとしています....(各アイテムを区切るために使用したドットなしで)
週次給与:
名称................................タイトル.......総額......税......正味
エベニーザー スクルージ パートナー 250.00 ..62.25 .187.75
ボブ・クラチット .........事務員 ......15.00 ....2.00 ..13.00
これは、この部分の私のコードがどのように見えるかです....
for (int count=0; count < numberOfEmployees; count++)
{
cout << "Employee: \n";
cout << "\t Name: ";
cin.getline (employees[count].name, EMPLOYEESIZE);
cout << "\t Title: ";
cin.getline (employees[count].title, EMPLOYEESIZE);
cout << "\t SSNum: ";
cin >> employees[count].SSNum;
cout << "\t Salary: ";
cin >> employees[count].Salary;
cout << "\t Withholding Exemptions: ";
cin >> employees[count].Withholding_Exemptions;
cin.ignore();
cout << "\n";
}
double gross;
double tax;
double net;
double adjusted_income;
cout << "\n";
cout << "Weekly Payroll: \nName \t \t Title \t Gross \t Tax \t Net \n";
for (int count=0; count < numberOfEmployees; count++)
{
gross = employees[count].Salary;
adjusted_income = subtraction_times (employees[count].Salary, employees[count].Withholding_Exemptions);
tax = adjusted_income * .25;
net = subtraction (gross, tax);
printf ("\n%s", employees[count].name);
}
私はテーブルの最初の部分(名前の部分)を持っていますが、その後、テーブルの残りの部分を行う方法がわかりません。誰でも私を助けることができますか?
ありがとう