About
export class Problem {
public A: number;
public B: number;
public k: -1 | 1;
public getDescription() {
let B = this.B.toString();
if (B[0] === "-") {
B = `(${B})`;
}
return `${this.A} ${this.k === -1 ? "-" : "+"} ${B} = ?`;
}
public solve() {
return this.A + this.B * this.k;
}
protected constructor() {
this.A = Math.floor(Math.random() * 201) - 100;
this.B = Math.floor(Math.random() * 201) - 100;
this.k = Math.random() < 0.5 ? 1 : -1;
}
} About me Who isTomáš Wróbel?
I am a web developer from Czechia with a hobby for problem-solving. I’m a social coder who enjoys the bridge between complex logic and human connection.
I wrote Hello World in Java when I was 11. At 12, I got a taste for the web. In my free time, I still develop open-source web applications, mostly for my own use.
My favourite languages Discover the tools behind my apps
behind my apps
Certificates Before practice, there wastheory
See more