diff --git a/Somme.java b/Somme.java new file mode 100644 index 0000000..521fafb --- /dev/null +++ b/Somme.java @@ -0,0 +1,22 @@ +import static utils.Utils.*; + +public class Somme { // FIXME A CHANGER + + public static final void main(String[] args) { + + int n=3; + + afficher("Somme", n, somme(n)); + + } + + public static int somme(int n){ + int result = 0; + for(int i = 0; i <= n; i++){ + result = i+result; + + } + return result; + } + +}