CS201 ASSIGNMENT NO.1 SOLUTION SPRING 2020 - VuDaily.com

Dark mode

CS201 ASSIGNMENT NO.1 SOLUTION SPRING 2020


CS201

-CS201 ASSIGNMENT NO.1 SOLUTION SPRING 2020-



CLICK HERE TODOWNLOAD THE SOLUTION FILE FROM HERE


#include<iostream>
using namespace std;

int main(){
int scale, initialSalary, incrementRate, taxDeductionRate;
float incrementValue, taxValue, netSalary = 0;
cout<<"*********** SALRY CALCULATOR **************\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 + incrementValue) * taxDeductionRate) / 100);
netSalary = (initialSalary + incrementValue) - taxValue;
cout<<"Initial Salary : "<<initialSalary;
cout<<"\nIncrement Amount : "<<incrementValue;
cout<<"\nIncreased Salary : "<<initialSalary + incrementValue;
cout<<"\nTex Deduction : "<<taxValue;
cout<<"\nNet Salary : "<<netSalary;
}


Post a Comment

0 Comments

Was this article useful? Please Leave Your Feedback by writing what's in your mind.