Cryptage
Fermé
david
-
13 déc. 2011 à 19:43
KX Messages postés 16668 Date d'inscription samedi 31 mai 2008 Statut Modérateur Dernière intervention 17 mars 2023 - 13 déc. 2011 à 22:33
KX Messages postés 16668 Date d'inscription samedi 31 mai 2008 Statut Modérateur Dernière intervention 17 mars 2023 - 13 déc. 2011 à 22:33
2 réponses
rominail
Messages postés
30
Date d'inscription
vendredi 23 avril 2010
Statut
Membre
Dernière intervention
3 novembre 2012
3
13 déc. 2011 à 20:10
13 déc. 2011 à 20:10
avec quel langage crypte tu?...
C?
C?
KX
Messages postés
16668
Date d'inscription
samedi 31 mai 2008
Statut
Modérateur
Dernière intervention
17 mars 2023
3 004
13 déc. 2011 à 22:33
13 déc. 2011 à 22:33
Commence par décomposer ton problème pour faire des petites méthodes assez simple, avec éventuellement un affichage console, car là tu essayes de faire une interface graphique inutile que tu ne maîtrise de toute façon pas !
Idée :
Idée :
public static char crypterUneLettre(char c);
public static char decrypterUneLettre(char c);
public static String crypterUnMot(String s);
public static String decrypterUnMot(String s);
public static void main(String...args)
{
System.out.print("Texte à crypter : ");
String s1 = new Scanner(System.in).nextLine();
String s2 = crypterUnMot(s1);
System.out.println("Texte crypté : "+s2);
String s3 = decrypterUnMot(s2);
System.out.println("Texte décrypté : "+s3);
}
13 déc. 2011 à 22:28