Coder Social home page Coder Social logo

juba666 / cic-go Goto Github PK

View Code? Open in Web Editor NEW
4.0 0.0 1.0 1.39 MB

Compound Interest Calculator Built With Golang

License: GNU General Public License v3.0

Go 100.00%
compound-interest interest-rate-calculation calculator-application investment-calculator computer-science compound-interest-calculator golang go gocode natural-logartihm

cic-go's People

Contributors

juba666 avatar

Stargazers

 avatar  avatar  avatar  avatar

Forkers

shappy082

cic-go's Issues

Inputting symbols and placeholders like £, $ and %

Describe the bug
Inputting symbols and placeholders like £ , $ and % bypasses validation rules

To Reproduce
Steps to reproduce the behavior:

  1. Open cic.go and choose choice 1
  2. Input 0 for Principal Amount
  3. Input £0 for Principal Amount

Expected behavior
First input triggers error and goto pa works, second input triggers error message but doesnt goto pa, instead skips to else statement

func calcFA() {
var p float64
var s string
var n float64
var r float64
pa:
fmt.Print("Enter a Principal Amount(£): ")
fmt.Scanf("%f\n", &p)
if !(p > 0) {
        fmt.Println("ERROR: you did not enter a number greater than zero, or included a symbol")
		goto pa
} else {

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.