CS201 Assignment 01 Fall 2020 Solution / Discussion
Tags:
Please Discuss here about this assignment.Thanks
Our main purpose here discussion not just Solution
Students having same subject can start discussion here to solve assignment, GDB & Quiz and can clear their concepts until solution is provided.
P.S: Please always try to add the discussion in proper format title like “CS101 Assignment / GDB No 01 Solution & Discussion Due Date: ___________”
Then copy Questions from assignment file and paste in Discussion.
+ http://bit.ly/vucodes (For Assignments, GDBs & Online Quizzes Solution)
+ http://bit.ly/papersvu (For Past Papers, Solved MCQs, Short Notes & More)
+ Click Here to Search (Looking For something at vustudents.ning.com?)
+ Click Here to Join (Our facebook study Group)
By Usama Khalid Awan
If user inputs wrong number then a message will be shown: “incorrect input”.
#Solution of #CS201 #Assignment 1 #Fall2020 by Washi - Introduction to programming
In this video we learn how to declare and initialize the variable and how to use the logical and athematic operator and in the last we use the if else conditional statement
#Solution of #CS201 #Assignment 1 #Fall2020
This is solution of assignment 1 of CS201 Fall 2020. Comelete and correct solution Assignment 1 CS201 FAll 2020. You can use DEV C++ software or use below link Link for Assignment write code: https://www.onlinegdb.com/online_c++_compiler
Information about an ABC organization is given below.
1. There are 10 employees in the organization.
2. There are 2 employees of level-A, 3 employees of level-B, 5 employees of level-C.
3. The information about their salaries is given below.
a) The salary of level-A employee is Rs.1, 25,000.
b) The salary of level-B employee is Rs.80, 000.
c) The salary of level-C employee is Rs.45, 000.
4. Rs.600 is deducted from the salaries of all employees against staff welfare fund.
5. If ANNUAL salary of an employee is more than Rs.600, 000, 1% tax is deducted from salary each month.
You are required to write a C++ program which finds
1) Total monthly tax deduction for all employees.
2) Total amount of welfare fund collected each month from all employees.
3) Net monthly salary of an employee. (Level-A, level-B, level-C).
(Hint: Net_Monthly_Salary= Original_Salary- Monthly_Tax – Monthly_Welfare_Fund)
4) Total amount which organization pays to its employees each month.
5) Also create a menu using (if-else) conditional statements, if a user wants to know about the separate tax collection of Level-A, Level-B, And Level-C employees.
If user enters 1, leve-A employee tax will be shown.
If user enters 2, leve-B employee tax will be shown.
If user enters 1, leve-C employee tax will be shown.
If user inputs wrong number then a message will be shown: “incorrect input”.
CS201 Solution Assignment#01 In CPP Format
Right Click on the below link, then click on “Save link as” to download the file.
CS201 Assignment No.1 2020
#include<iostream>
using namespace std;
main()
{
long sal_level_a=125000, sal_level_b=80000, sal_level_c=45000;
int total_employees=10;
int welfare_fund=600;
int tax_level_a, total_tax_A, tax_level_b, total_tax_B, tax_level_c,total_tax_C, total_tax;
int option;
long Net_salary_A, Net_salary_B, Net_salary_C, total_pay;
// FUNDS
int total_fund=total_employees*welfare_fund;
long anual_salary_A=sal_level_a*12;
long anual_salary_B=sal_level_b*12;
long anual_salary_C=sal_level_c*12;
if(anual_salary_A>600000)
{
tax_level_a=sal_level_a*1/100;
}
total_tax_A=tax_level_a*2;
if(anual_salary_B>600000)
{
tax_level_b=sal_level_b*1/100;
}
total_tax_B=tax_level_b*3;
if(anual_salary_C>600000)
{
tax_level_c=sal_level_c*1/100;
}
total_tax_C=tax_level_c*5;
// TAX CALCULATION
total_tax=total_tax_A+total_tax_B+total_tax_C;
// NET SALARIES
Net_salary_A= sal_level_a - tax_level_a - welfare_fund;
Net_salary_B= sal_level_b - tax_level_b - welfare_fund;
Net_salary_C= sal_level_c - tax_level_c - welfare_fund;
//total_pay=(Net_salary_A*2)+(Net_salary_B*3)+(Net_salary_C*5);
total_pay=(sal_level_a*2)+(sal_level_b*3)+(sal_level_c*5);
cout"Total Monthly tax deduction of all employees : "total_tax;
cout"\nTotal amount of welfare fund collected : "total_fund;
cout"\nNet monthly salary of level A employees : "Net_salary_A;
cout"\nNet monthly salary of level B employees : "Net_salary_B;
cout"\nNet monthly salary of level C employees : "Net_salary_C;
cout"\nTotal amount paid by university after a month : "total_pay;
// MENU
cout"\nEnter 1 to know the tax collection of level A employees";
cout"\nEnter 2 to know the tax collection of level B employees";
cout"\nEnter 3 to know the tax collection of level C employees"endl;
cin>>option;
if(option==1)
{
cout"Tax collection of level A employee is Rs. "total_tax_A;
}
else if(option==2)
{
cout"Tax collection of level B employee is Rs. "total_tax_B;
}
else if(option==3)
{
cout"Tax collection of level C employee is Rs. "total_tax_C;
}
}
CS201-Assignment-No.1-2020-Solution File
Right Click on the below link, then click on “Save link as” to download the file.
© 2021 Created by + M.Tariq Malik.
Powered by
Promote Us | Report an Issue | Privacy Policy | Terms of Service
We non-commercial site working hard since 2009 to facilitate learning Read More. We can't keep up without your support. Donate.
We are user-generated contents & non-commercial site. All product, videos, pictures & others contents on site don't seem to be beneath our Copyrights & belong to their respected owners & freely available on public domains. All Contents on site are for personal & non-commercial use.We believe in Our Policy & do according to them. If Any content is offensive in your Copyrights then please email at m.tariqmalik@gmail.com with copyright detail & We will happy to remove it immediately.
Management: Admins ::: Moderators
Awards Badges List | Moderators Group
All Members | Featured Members | Top Reputation Members | Angels Members | Intellectual Members | Criteria for Selection
Become a Team Member | Safety Guidelines for New | Site FAQ & Rules | Safety Matters | Online Safety | Rules For Blog Post