Skip to content

MathPipe, a versatile toolkit built in C that empowers you to perform a wide range of mathematical operations on input arrays.

Notifications You must be signed in to change notification settings

b-chrit/numberOperationProgam

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mathpipe: Simple Number Operations Program

Overview

Mathpipe is a program that performs various simple operations on input numbers. It reads a jagged array from standard input and applies requested operations on each row, printing the result to standard output. Errors are reported to stderr.

Usage

gcc -Wall aggregate.c singular.c mathpipe.c -o mathpipe
cat sample.txt | ./mathpipe <operation> [options]

Operations

Mathpipe supports the following operations:

  • COUNT: Prints the number of elements in a given array.
  • MIN: Prints the minimum value in a given array.
  • MAX: Prints the maximum value in a given array.
  • SUM: Prints the sum of values in a given array.
  • AVG: Prints the average value of elements in a given array.
  • PAVG: Prints the pseudo-average (avg of min and max) of elements in a given array.
  • PRINT: Prints the numbers in the array.
  • FILTER: Prints numbers passing a filter criteria.
  • SHIFT: Adds a value to each element of the array.

Compilation

Compile the program using:

gcc -Wall aggregate.c singular.c mathpipe.c -o mathpipe

About

MathPipe, a versatile toolkit built in C that empowers you to perform a wide range of mathematical operations on input arrays.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages