Git Product home page Git Product logo

table-cpp's Introduction

Multiplication Table in C++

This repository contains a function that generates and prints the multiplication table up to n x n.

Example

Here's an example of how the printMultiplicationTable function can be used:

int n = 5;
printMultiplicationTable(n);

Expected Output:

1  2  3  4  5
2  4  6  8 10
3  6  9 12 15
4  8 12 16 20
5 10 15 20 25

Prerequisites

Before you begin, ensure you have the following installed on your local machine:

  • A modern C++ compiler
  • Git
  • Docker

Getting Started

Follow these steps to get a copy of the project up and running on your local machine for development and testing purposes.

Clone the Repository

First, clone the repository using the following commands:

git clone https://github.com/e2e2a/table-cpp.git
cd table-cpp

Build and Run the Application

To build the application, use the following command:

g++ -o table table.cpp

To run the application, use the following command:

./table

Docker

This repository also includes a Dockerfile for building a Docker image of the application. To build the Docker image, use the following command:

docker build -t table .

To run the Docker image, use the following command:

docker run -v ${PWD}:/app table

To run the table.exe:

docker run -it table

Continuous Integration with GitHub Actions

This repository uses GitHub Actions for continuous integration. Upon every push to the repository, the GitHub Actions workflow will automatically build the project and create a release with the built executable.

Setting up GitHub Actions

Before you can use GitHub Actions, you need to update the workflow permissions. Navigate to your project’s Settings -> Actions -> General -> Workflow permissions and set it to Read and write permissions. This allows GitHub Actions to access workflow environment variables like $GITHUB_TOKEN.

table-cpp's People

Contributors

e2e2a avatar

Watchers

 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.