-
```php
$s = "ses vraies";
$a = range("0 ", "z "); $b = ""; $c = strlen($s)-1; $e = false;
while($c >= 0) {if($s[$c] === " ") { $b .= " ";} else {
foreach($a as $d) {if ($d === $s[$c]) {$b .=…
-
```golang
package main
import "fmt"
func reverse(str string) (ret string) {
for _, s := range str {
defer func(s rune) {
ret += string(s)
}(s)
}
return
}
func main() {
f…
rumpl updated
2 years ago
-
Pour le tester : https://scastie.scala-lang.org/FkBy1tSYTFGgvwunkQophA
```scala
import scala.concurrent.ExecutionContext.Implicits.global
import scala.concurrent.duration.Duration
import scala.c…
To-om updated
2 years ago
-
Codepen : https://codepen.io/ybonnel/pen/YzqOmVz
Javascript :
```
function magicFunction(event) {
const revertDiv = document.querySelector('.revert')
revertDiv.innerHTML = event.target.val…
-
Programme essayer, debuger et creer sur une calculette
```
def renversement_par_paire(chaine_de_caractere):
resultat = chaine_de_caractere
for loop1 in range(len(chaine_de_caractere)):…
-
Première proposition
testable ici: https://play.golang.org/p/faImxdRQbW7
```go
package main
import (
"fmt"
)
func main() {
fmt.Println(reverse("j'ai perdu"))
}
func reverse(a string)…
-
Bon pour l'instant je n'ai réussi à faire que des inversions de chaines de 1 mot, ça stoppe sur les espaces, mais idéalement la V2 bientôt. Encore plus glam.
A lire avec la voix d'Alice Cooper ou …
-
Je génère une chaine aléatoire à partir de la chaine de base (shuffle).
(On aurait pu le faire totalement aléatoirement mais il faut quand même que ça fonctionne.)
Je vérifie si c'est bon.
Et je re…
-
```java
import java.util.Scanner;
public class MauvaiCode {
public static void main(String[] args) {
new Scanner(System.in).next();
System.out.println("dlrow olleH");
}
}
…
-
```php
CLASS LaMéthodeQuiRoutourneLeTexte {
FUNCTION __LaClasseQuiVérifieQueSesBon(string $LeTexteATester, string $LeTexteOriginal) {
$LaChaineRoutourné = '';
$__ITERATOR = str…