clear
This commit is contained in:
parent
69c307f081
commit
8f133c177d
@ -14,35 +14,5 @@ public class DozorovaLabWorkApplication {
|
||||
SpringApplication.run(DozorovaLabWorkApplication.class, args);
|
||||
}
|
||||
|
||||
@GetMapping("/")
|
||||
public String Hello() {
|
||||
return "Hello, user";
|
||||
}
|
||||
|
||||
@GetMapping("/sum")
|
||||
public String Sum(@RequestParam(required = false, defaultValue = "0") float first,
|
||||
@RequestParam(required = false, defaultValue = "0") float second) {
|
||||
return Float.toString(first + second);
|
||||
}
|
||||
|
||||
@GetMapping("/ras")
|
||||
public String Ras(@RequestParam(required = false, defaultValue = "0") float first,
|
||||
@RequestParam(required = false, defaultValue = "0") float second) {
|
||||
return Float.toString(first - second);
|
||||
}
|
||||
|
||||
@GetMapping("/pros")
|
||||
public String Pros(@RequestParam(required = false, defaultValue = "1") float first,
|
||||
@RequestParam(required = false, defaultValue = "1") float second) {
|
||||
return Float.toString(first * second);
|
||||
}
|
||||
@GetMapping("/del")
|
||||
public String Del(@RequestParam(required = false, defaultValue = "1") float first,
|
||||
@RequestParam(required = false, defaultValue = "1") float second) {
|
||||
if(second == 0)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
return Float.toString(first/second);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user