Git Product home page Git Product logo

chetannihith / cpp-hacktoberfest23 Goto Github PK

View Code? Open in Web Editor NEW
9.0 1.0 18.0 289 KB

Fork this repository to contribute your Cpp programs. Don't forget to give this repo a star ⭐️. Happy hacking!!

Home Page: https://github.com/chetannihith/Cpp-hack

C++ 43.01% C# 0.29% Java 48.98% JavaScript 1.51% PHP 0.28% Python 3.14% Ruby 0.98% Elixir 0.16% Kotlin 1.46% Dart 0.19%
hacktoberfest hacktoberfest-accepted hacktoberfest2023

cpp-hacktoberfest23's Issues

Tax Calculator

Write a program that takes as input your gross salary and your total saving and uses another function named taxCalculator() to calculate your tax. The taxCalculator() function takes as parameters the gross salary as well as the total savings amount. The tax is calculated as follows:

  • (a) The savings is deducted from the gross income to calculate the taxable income. The maximum deduction of savings can be Rs. 100,000, even though the amount can be more than this.

  • (b) For up to 100,000 as taxable income the tax is 0 (Slab 0); beyond 100,000 to 200,000 tax is 10% of the difference above 100,000 (Slab 1); beyond 200,000 up to 500,000 the net tax is the tax calculated from Slab 0 and Slab 1 and then 20% of the taxable income exceeding 200,000 (Slab 2); if its more than 500,000, then the tax is tax from Slab 0, Slab 1, Slab 2 and 30% of the amount exceeding 500,000.

Max of Integral data set - pointer

Write a C++ program to find the max of an integral data set. The program will ask the user to input the number of data values in the set and each value. The program prints on the screen a pointer that points to the max value.

Employee - class and objects

Write a program by creating an 'Employee' class having the following functions and print
the final salary.

  • 'getlnfo()' which takes the salary, number of hours of work per day of employee as parameters

  • 'AddSal()' which adds $10 to the salary of the employee if it is less than $500.

  • 'AddWork()' which adds $5 to the salary of the employee if the number of hours of work per day is more than 6 hours.

Overloading 1.0

Create a 'Rectangle' class with two data members, length and breadth, and a function to calculate the area that is 'length*breadth'. The class has three constructors, which are as follows:

  • a - no parameter - length and breadth values are both set to zero.

  • b - using two numbers as parameters, one for length and one for breadth.

  • c - Using a single number as a parameter - that number is assigned to both length and breadth.

Now, create objects of the 'Rectangle' class having none, one, and two parameters and print their areas.

Multiple Inheritance

We want to calculate the total marks of each student of a class in Physics, Chemistry, and Mathematics and the average marks of the class. The number of students in the class is entered by the user. Create a class named Marks with data members for roll number, name, and marks. Create three other classes inheriting the Marks class, namely Physics, Chemistry, and Mathematics, which are used to define marks in the individual subjects of each student. The roll number of each student will be generated automatically.

Overloading 2.0

Write a program to calculate the salary of Indian Railway employees. Three
are three types of employees in Indian railways. They are regular, daily wages
and consolidated employees. Gross Pay for the employees is calculated as
follows:

  • a - regular employees = basic + HRA + (10%of DA * basic)
  • b - Daily wages = wages per hour * number of hours
  • c - Consolidated = a fixed amount

Add a contributing file

This file describe how to fork , clone, create branch, commit message, and push to the repository which is followed inorder to get their PRs merged.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.