Without more information for what the programming language is I cannot give a full answer, so I listed a potential method for calculating salary.
To calculate the salary (Java):
public static double getSalary(double salary) {
if (salary < 40000) {
return salary + (salary * 0.05);
}
return 2000 + ((0.02 * salary) + salary);
}
To calculate the salary (VB .Net):
Function getSalary(ByVal salary As Double) As Double
If salary < 40000 Then
salary = salary + (salary * 0.05)
Else
salary = 2000 + ((0.02 * salary) + salary)
End If
Return salary
End Function
It is
Select an appropriate layout
Decide which current format...
Import or compose...
Proofread...
Check the print preview..
Void sort3(int& a, int& b, int& c)
{
if (a > b)
{
std::swap(a, b);
}
if (b > c)
{
std::swap(b, c);
}
if (a > b)
{
std::swap(a, b);
}
}