Giter Site home page Giter Site logo

calculate's People

Watchers

 avatar

calculate's Issues

вычасление корня уровнения на языке GOlang

`package main

import (
"fmt"
"math"
)

func main() {
var A float64
var b float64
var c float64
fmt.Println("реши квадратное уроавненеие")

fmt.Println("введu А:")
fmt.Scan(&A)

fmt.Println("введu b:")
fmt.Scan(&b)

fmt.Println("введu c:")
fmt.Scan(&c)

D := (b * b) - 4*(A*c)

if D > 0 {
	var x1 float64
	var x2 float64

	x1 = (-b + math.Sqrt(D)) / (2 * A)
	x2 = (-b - math.Sqrt(D)) / (2 * A)

	fmt.Println("ваше уравнение имеет 2 корня\n D = " + fmt.Sprint(D))
	fmt.Println("x1: " + fmt.Sprint(x1) + "\nx2:" + fmt.Sprint(x2))
} else if D == 0 {
	var x float64

	x = (-b) / (2 * A)

	fmt.Println("Ваше уравнение имеет 1 корень\nD")
	fmt.Println("x:" + fmt.Sprint(x))
} else if D < 0 {
	fmt.Println("ваше уравнение не имеет корне\nD < 0\nD = " == fmt.Sprint(D))
}

}

`

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.