repo.or.cz
/
exercicis-automatics-matematiques.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
history
|
raw
|
HEAD
simplificació de codi
[exercicis-automatics-matematiques.git]
/
incomplets
/
prova.rb
blob
6107c009cf4a109494823f531bb54786bc385b10
1
# SPDX-FileCopyrightText: 2023 Xavier Bordoy
2
#
3
# SPDX-License-Identifier: MIT
4
5
require 'erb'
6
7
plantilla = "Calculeu $<%= a %> + <%=b %>$. Resultat: $<%= a + b %>$"
8
9
10
r = ERB.new(plantilla)
11
a = rand(10)
12
b = rand(5)
13
14
puts r.result()