Skip to content

Input a few integers of a series and it will return the source code to output that series till the nth term..

License

Notifications You must be signed in to change notification settings

junaidrahim/program-homework-solver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

48 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HEADER

Codacy Badge

A simple command line application written in C++ that helps you generate source code to produce a given series of integers.

You provide a few terms of the series as input and the program will generate for you, the source code in a few programming languages that prints n number of terms of that particular series.

Motivation

Ever seen questions of the kind "Write a program that prints till the nth term of the series 1,3,5,7..."

Thus thought automating this stuff.

A program in which you enter any series of integers and hopefully it generates the source code you need to output that series in multiple programming languages.

The mathematical method used is Lagranges Interpolation Method.

Lagranges Interpolation Method

Given a set of k + 1 data points

data points

where no two x_j are the same, the interpolation polynomial in the Lagrange form is a linear combination

Lagrange polynomial

of Lagrange basis polynomials Basis Polynomial

Read more at Lagrange Interpolation Method (Wikipedia)

How to Compile and Run

Requirements :

  • Cmake
  • make
  • GCC

You can install these using your preferred package manager in Linux

How to Compile:

  • cd into the project directory
  • run cmake .
  • then run make

The binary program-homework-solver will be compiled in the bin/ directory

Use ./program-homework-solver to run the binary.

Instructions to run the Unit Tests are here

DEMO


LICENSE

Copyright (c) Junaid Rahim. All rights reserved.

Licensed under the MIT License


forthebadge forthebadge forthebadge

About

Input a few integers of a series and it will return the source code to output that series till the nth term..

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published