Skip to content

cloud971/hw1-cha

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Project 1


The following Project calculates the lcm,gcd,sum and product of given numbers. If no numbers are given then the output would be 0. If only one number is given then the output is that number

GCD

To find the GCD of numbers run the following:

$calc gcd 1 2 3 4
$1

Sum

To find the sum of numbers run the following:

$calc sum 1 2 3 4
$10

LCD

To find the LCD of numbers run the following:

$calc lcd 1 2 3 4
$1

Prodcut

To find the product of numbers run the following:

$calc product 1 2 3 4
$24

No Arguments

Output with no arguments
$calc sum
$0

One Argument

Output with one argument only
$calc sum 4
$4

Test

To test the program run the following command:
$cargo test
All the test should pass

Results

All of the following test cases passed. Unit test were written for each functionality of the project.
The project succesfully calculated lcm,gcd,product and sum of given numbers.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages