создание

This commit is contained in:
Katerine881 2023-02-13 15:20:28 +04:00
parent 50f4386143
commit 97a239d1b1

View File

@ -30,22 +30,22 @@ public class AppApplication {
} }
@CrossOrigin @CrossOrigin
@GetMapping("/ras") @GetMapping("/difference")
public String Ras(@RequestParam(required = false, defaultValue = "0") double first, public String Difference(@RequestParam(required = false, defaultValue = "0") double first,
@RequestParam(required = false, defaultValue = "0") double second) { @RequestParam(required = false, defaultValue = "0") double second) {
return Double.toString(first - second); return Double.toString(first - second);
} }
@CrossOrigin @CrossOrigin
@GetMapping("/pros") @GetMapping("/multiplication")
public String Pros(@RequestParam(required = false, defaultValue = "1") double first, public String Multiplication(@RequestParam(required = false, defaultValue = "1") double first,
@RequestParam(required = false, defaultValue = "1") double second) { @RequestParam(required = false, defaultValue = "1") double second) {
return Double.toString(first * second); return Double.toString(first * second);
} }
@CrossOrigin @CrossOrigin
@GetMapping("/del") @GetMapping("/division")
public String Del(@RequestParam(required = false, defaultValue = "1") double first, public String Division(@RequestParam(required = false, defaultValue = "1") double first,
@RequestParam(required = false, defaultValue = "1") double second) { @RequestParam(required = false, defaultValue = "1") double second) {
if(second == 0) if(second == 0)
{ {