Décodage morse-français
Résolu/Fermé
Et-laine
-
8 déc. 2012 à 16:42
KX Messages postés 16668 Date d'inscription samedi 31 mai 2008 Statut Modérateur Dernière intervention 17 mars 2023 - 8 déc. 2012 à 17:41
KX Messages postés 16668 Date d'inscription samedi 31 mai 2008 Statut Modérateur Dernière intervention 17 mars 2023 - 8 déc. 2012 à 17:41
A voir également:
- Décodage morse-français
- Wetransfer français - Télécharger - Téléchargement & Transfert
- Gimp français - Télécharger - Retouche d'image
- WeTransfer gratuit : envoyer des fichiers via Internet - Guide
- Coran en français - Télécharger - Histoire & Religion
- Chatgpt français - Télécharger - Outils Internet
1 réponse
KX
Messages postés
16668
Date d'inscription
samedi 31 mai 2008
Statut
Modérateur
Dernière intervention
17 mars 2023
3 005
8 déc. 2012 à 17:41
8 déc. 2012 à 17:41
Solution simple : tu rajoutes un espace final à phrase avant de commencer le traitement.
phrase+=" ";Ou alors, tu modifies les conditions pour ajouter le dernier caractère ET faire le switch :
for (int i = 0; i<phrase.length(); i++)
{
if (phrase.charAt(i)!=' ' || i==phrase.length()-1)
{
phraseInterm += phrase.charAt(i);
if (i!=phrase.length()-1)
continue; // on ne fait pas le switch
}
switch (phraseInterm)
{
...