Вы находитесь на странице: 1из 3

Simplified Construction Accounting-Government Agencies

Problem
A program that will simplify the complex computation of Net Amount paid by the Government
Agencies to its Contactors.

Program
#include <iostream>
#include <math.h>
using namespace std;
void main()
{
long int num1,num6,num7;
double num2,num3,num4,num5,num8,num9;
char name[100];
cout<<"CONSTRUCTION ACCOUNTING-GOVERNMENT AGENCIES"<<endl;
cout<<" "<<endl;
cout<<"Contractor: ";
cin.getline (name,100);
cout<<"Contract Price: ";
cin>>num1;
cout<<"Retention % (in decimal): ";
cin>>num2;
cout<<"Recoupment % (in decimal): ";
cin>>num3;
cout<<"Percentage of Completion-Previous Payment: ";
cin>>num4;
cout<<"Percentage of Completion-Current Payment: ";
cin>>num5;
cout<<"----------------------------------------------------"<<endl;
num6=num5*num1-num4*num1;
cout<<"Gross Amount: "<<num6<<endl;
num7=num6-num6*num2-num6*num3;
cout<<"Gross Amount after Retention and Recoupment: "<<num7<<endl;
num8=num7*0.07/1.12;
cout<<"Tax Withheld: "<<num8<<endl;
cout<<"----------------------------------------------------"<<endl;
num9=num7-num8;
cout<<"The Net Amount to be paid to "<<name<<" is "<<num9<<". "<<endl;
}

Output

Discussions
For creating a program and source file see Discussion of Activity 1 and for
introduction of the main program, introduction of variables and input of characters involving
personal information, see Discussion of Activity 4.
An additional information on introduction of variable which is long int which enable
the program to display millions. Thats why the contact price and the gross amounts are
introduced as such.
After the information which is the Contractor are entered, proceed to the program
which accepts the contract price, the recoupment(10%), retention(10%), Percentage of
Completion-Previous Payment(15%) and Percentage of Completion-Current Payment(15%).
For the computation for the net amount paid, formula for Gross amount is computed
by multiplying contract price from the difference between Percentage of Completion-
Previous Payment(15%) and Percentage of Completion-Current Payment(15%), Gross
amount after recoupment and retention is the gross amount after deducting 10% retention
and 10%recoupment and Tax withheld is computed by dividing Gross amount after
recoupment and retention by 1.12 and multiply it by 7%. In Government agencies, they are
required to withhold 7% of the Amount without the VAT that is why divided by 1.12 is used.
Then the Net Amount should be paid is the difference between the Gross amount after
recoupment and retention and the Tax withheld.
After each of the formula , is the displaying of the answer in the form of cout like
what is in the program.
For ending the main program, see Discussion of Activity 4.
Note that the design of the program depends on your choice. It may include spaces
and lines as separation.
Start the program(See Discussion of Activity 1).

Вам также может понравиться