mirror of https://github.com/01-edu/public.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
38 lines
667 B
38 lines
667 B
package main |
|
|
|
//This solution is the placeholder of the student solution |
|
// for an exercise in the exam asking for a Function |
|
//Remember the disclaimer!!!! |
|
//1) here the package is main |
|
//2) It does need an empty func main(){} |
|
|
|
func Nauuo(plus, minus, rand int) string { |
|
if rand == 0 { |
|
if plus > minus { |
|
return ("+") |
|
} |
|
if plus < minus { |
|
return ("-") |
|
} |
|
if plus == minus { |
|
return ("0") |
|
} |
|
} |
|
if plus > minus+rand { |
|
return ("+") |
|
} |
|
if plus+rand < minus { |
|
return ("-") |
|
} |
|
if (plus+rand >= minus) && (plus-rand <= minus) { |
|
return ("?") |
|
} |
|
if (minus+rand >= plus) && (minus-rand <= plus) { |
|
return ("?") |
|
} |
|
return ("?") |
|
} |
|
|
|
func main() { |
|
|
|
}
|
|
|