+1 vote
308 views

Hi, CS201 Assignment No.1 Spring 2020 solution is required. If anybody have the solution, please help me!

Due Date is: 1 Jun 2020

Keywords: cs201 assignment 1 2020,
CS201 Assignment No.1 Spring 2020,
CS201 Assignment No 1 Spring 2020,
CS201 Spring 2020,
CS201 Assignment Solution Spring 2020,
CS201 Assignment No.1 Spring May 2020,
CS201 Assignment No 1 Spring May 2020,
CS201 Assignment 1 Spring May 2020,

| 308 views

+1 vote

Thanks Athar for being active on our website. We are always here to help the public. Here is the solution of CS201 Assignment No.1 Spring 2020

``````#include<iostream>

using namespace std;

int main() {
int PScale;
int startigSalary;
int Increase;
int Tax;
float increaseValue;
float taxValue;
float totalSalary = 0;

cout <<endl<<"------------------------"<<endl;
cout <<"SALARY CALCULATOR ";
cout <<endl<<"------------------------"<<endl;
cout <<"* 1 for Scale 6" << endl;
cout <<"* 2 for Scale 7" << endl;
cout <<"* 3 for Scale 8" << endl;
cout <<"* 4 for Scale 9" << endl;

cout <<"Choose an option: ";

cin >> PScale;
if (PScale == 1) {
startigSalary = 40000;
Increase = 20;
Tax = 3;
}
else if (PScale == 2) {
startigSalary = 60000;
Increase = 15;
Tax = 3;
}
else if (PScale == 3) {
startigSalary = 80000;
Increase = 10;
Tax = 3;
}
else if (PScale == 4) {
startigSalary = 100000;
Increase = 5;
Tax = 3;
}
else {
cout << endl<<"Wrong Choice"<<endl;
return 0;
}
increaseValue = ((startigSalary * Increase) / 100);
taxValue = (((startigSalary + increaseValue) * Tax) / 100);
totalSalary = (startigSalary + increaseValue) - taxValue;
cout << endl<<"Initial Salary : " << startigSalary;
cout << endl<<"Increment Amount : " << increaseValue;
cout << endl<<"Increased Salary : " << startigSalary + increaseValue;
cout << endl<<"Tax Deduction : " << taxValue;
cout << endl<<"Net Salary : " << totalSalary;
}``````

and here is a working screenshot of the solution Thanks for being our website user!

by (1.4k points)
``````#include<iostream>
using namespace std;

//bc190413541
//Ihsan ghafoor
main()
{
int scale,initialSalary,incrementRate,taxdeductionRate;
float incrementValue,taxValue,netSalary=0;
cout<<"***********SALARY CALULATOR***********\n";
cout<<"**************************************\n";
cout<<"***********Enter 1 For SPS6***********\n";
cout<<"***********Enter 2 For SPS7***********\n";
cout<<"***********Enter 3 For SPS8***********\n";
cout<<"***********Enter 4 For SPS9***********\n";

cout<<"Select a payscale from the menu:";

cin>> scale;
if (scale == 1){
initialSalary = 40000;
incrementRate = 20;
taxdeductionRate = 3;
}else if (scale == 2){
initialSalary = 60000;
incrementRate = 15;
taxdeductionRate = 3;
}else if (scale == 3){
initialSalary = 80000;
incrementRate = 10;
taxdeductionRate = 3;
}else if (scale == 4){
initialSalary = 100000
incrementRate = 5;
taxdeductionRate = 3;
} else {
cout<<" you enter wrong scale\n";
return 0;
}
incrementValue = ((initialSalary * incrementRate) / 100);
taxValue = (((initialSalary + incrementRate) * texdeduction) / 100);
netSalary = (initialSalary + incrementValue) - taxValue
cout<<"initial Salary : "<<initialSalary;
cout<<"\nincrement amount : "<<incrementValue;
cout<<"\nincreased Salary : "<<initialsSalary + incrementValue;
cout<<"\nTex deduction : "<<TaxValue;
cout<<"\nNet Salary : "<<netSalary;
}

``````
by (130 points)
is there a problem with your source code?

+1 vote