Giter Club home page Giter Club logo

tasks.cpp's Introduction

lab logo  

tasks.cpp

Status GitHub Issues GitHub Pull Requests License


A collection of C++ programs that covers code of various popular problems.

Contributing to this repo will count against one of the PRs for HacktoberFest2020 only if submitted between 1st October and 31st October.

Please refer to CONTRIBUTING.md for the same.

The following problems need solutions as on date 4th Oct, 2020

  1. WAP to find area of a circle, a rectangle and a triangle, using concept of function overloading.
  2. WAP to find volume of a sphere, a cylinder and a cuboid, using function overloading.
  3. WAP which displays a given character, n number of times, using a function. When the n value is not provided, it should print the given character 80 times. When both the character and n value is not provided, it should print ‘*’ character 80 times. Write the above program in two ways:-
    • using function overloading.
    • using default arguments
  4. WAP to find square and cube of a number using inline function.
  5. WAP to increment the value of an argument given to function USINGINLINE function.
  6. Write a program to create a class called COMPLEX and implement the following overloading functions ADD that return a COMPLEX number.
    • ADD (a , s2) - where a is an integer (real part) and s2 is a complex number.
    • ADD (s1, s2) - where s1 and s2 are complex numbers.
  7. Write a program to demonstrate the concept of call-by-value, call-by-reference & call-by address by taking swapping of two numbers as an example.
  8. Write a program to demonstrate the use of scope resolution operator(::) by declaring same variable name globally and locally and display the value of global and local variables.
  9. Create a class ‘shape’. Derive three classes from it: Circle, Triangle and Rectangle. Include the relevant data members and functions in all the classes. Find the area of each shape and display it.
  10. Create a class which stores employee name,id and salary Derive two classes from ‘Employee’ class: ‘Regular’ and ‘Part-Time’. The ‘Regular’ class stores DA, HRA and basic salary. The ‘Part-Time’ class stores the number of hours and pay.
  11. .Write a program to find out the greatest between two numbers defined in two different classes by using friend function

🏁 Getting Started

Clone the repo and run in the directory

g++ main.cpp -o main.out && ./main.out

🎈 Usage

  • The interface of the menu is fairly simple, you just have to enter the number, which is against the function you wish to run and then follow the instructions displayed.

❗ Issues

If you find any bugs, please create an issue. We will work towards resolving it as fast as we can.

✍️ Authors

See also the list of contributors who participated in this project.

tasks.cpp's People

Contributors

sahilkr24 avatar danish-mahajan avatar

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.