Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Picasoft
APIs
Init
Sh
Commits
ccc5de37
Verified
Commit
ccc5de37
authored
Jan 09, 2021
by
Romain De Laage De Bellefaye
🌳
Browse files
Add fibo exo
parent
a3e03cf1
Pipeline
#72163
passed with stage
in 11 minutes and 34 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
main.tex
View file @
ccc5de37
...
...
@@ -15,6 +15,7 @@
\usepackage
{
xcolor
}
\usepackage
{
tikz
}
\usepackage
{
upquote
}
\usepackage
{
amssymb,amsmath
}
\hypersetup
{
pdfauthor=
{
Romain de Laage, Tobias Ollive
}
,
pdftitle=
{
Api/casoft Init - Jour 3 partie 1 : Scripts shell
}
...
...
src/shell/exo_fibo.sh
0 → 100755
View file @
ccc5de37
#! /usr/bin/bash
echo
"Entrer un rang n : "
read
n
u0
=
0
u1
=
1
echo
"u0 =
$u0
"
echo
"u1 =
$u1
"
for
i
in
$(
seq
2
$n
)
do
u2
=
$((
$u0
+
$u1
))
echo
"u
$i
=
$u2
"
u0
=
$u1
u1
=
$u2
done
src/tex/exercices.tex
View file @
ccc5de37
...
...
@@ -13,6 +13,29 @@
\end{alertblock}
\end{frame}
\begin{frame}
{
Fibonacci
}
\begin{block}
{
Énoncé
}
Créer un script qui demande à un utilisateur un entier et affiche les différents termes de la suite de Fibonacci jusqu'au rang indiqué.
\end{block}
\begin{alertblock}
{
Indices
}
\begin{itemize}
\item
Rappelez-vous de la manière de créer une boucle
\item
On peut penser à l'utilisation de
\texttt
{
seq
}
\item
On rappelle la définition de la suite de Fibonacii :
$$
\left\{
\begin
{
array
}{
lllll
}
u
_{
n
+
2
}
&
=
&
u
_{
n
+
1
}
&
+
&
u
_
n
\\
u
_
1
&
=
&
1
&
&
\\
u
_
0
&
=
&
0
&
&
\end
{
array
}
\right
.
$$
\end{itemize}
\end{alertblock}
\end{frame}
\begin{frame}
[fragile]
{
Happy new year !
}
\framesubtitle
{
Découvrez la synthèse vocale sur Linux
}
\begin{block}
{}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment