CONNEXION
  • RetourJeux
    • Sorties
    • Hit Parade
    • Les + populaires
    • Les + attendus
    • Soluces
    • Tous les Jeux
    • Gaming
  • RetourActu Gaming
    • News
    • Astuces
    • Tests
    • Previews
    • Toute l'actu gaming
  • RetourBons plans
    • Bons plans
    • Bons plans Smartphone
    • Bons plans Hardware
    • Bons plans Image et Son
    • Bons plans Amazon
    • Bons plans Cdiscount
    • Bons plans Decathlon
    • Bons plans Fnac
    • Tous les Bons plans
  • RetourJVTech
    • Actus High-Tech
    • Intelligence Artificielle
    • Smartphones
    • Mobilité urbaine
    • Hardware
    • Image et son
    • Tutoriels
    • Tests produits High-Tech
    • Guides d'achat High-Tech
    • JVTech
  • RetourCulture
    • Actus Culture
    • Culture
  • RetourVidéos
    • A la une
    • Gaming Live
    • Vidéos Tests
    • Vidéos Previews
    • Gameplay
    • Trailers
    • Chroniques
    • Replay Web TV
    • Toutes les vidéos
  • RetourForums
    • Hardware PC
    • PS5
    • Switch 2
    • Xbox Series
    • Switch
    • Pokemon pocket
    • FC 25 Ultimate Team
    • League of Legends
    • Tous les Forums
  • PC
  • PS5
  • Xbox Series
  • Switch 2
  • PS4
  • One
  • Switch
  • iOS
  • Android
  • MMO
  • RPG
  • FPS
En ce moment Genshin Impact Valhalla Breath of the wild Animal Crossing GTA 5 Red dead 2
Liste des sujets

[java] besoin d'aide pour un code cesar

mokona56
mokona56
Niveau 10
09 février 2013 à 23:14:43

Voilà , le programme en question :
Malheureusement ça ne marche pas et je ne vois pas où :(
J'ai beau chercher je ne trouve pas , merci dem'aider si vous trouver :)

void main() {
int c, nombre_phrase = 0,nombre_mots = 0,Nombre_lettres = 0,n = 0;
String f;
//resetConsole();
n = readInt();
openFileReader("nomDuFichier.txt");
openFileWriter("fichier2.txt");
c = readNextCode();
char alphabet[] = {
'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'g', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'}
;
while (c != - 1) {
if (c >= 97 && c <= 119) {
c = c + 3;
}
if (c >= 120 && c <= 122) {
c = c + 23;
}
if (c == 33 || c == 46 || c == 63) {
nombre_phrase ++;
}
if (c == 32 || c == 45) {
nombre_mots ++;
}
afficheCodeAuFormatCar(c);
WriteNextCode(c);
c = readNextCode();
nombre_lettres ++;
}
// End While
nombre_lettres = nombre_Lettres - (nombre_phrase + nombre_mots);
print("il y a " + nombre_lettres);
println("lettres");
print("ainsi que" + nombre_phrase);
println(" phrases");
print(" et aussi" + nombre_mots);
println("mots");
closeFileReader();
closeFileWriter();
}

ACE44
ACE44
Niveau 10
10 février 2013 à 00:24:16

forum programmation :ok:

Sous forums
  • Histoire
  • Philosophie
  • Cours et Devoirs
  • Politique
  • Environnement & Nature
  • Métiers & Orientation
La vidéo du moment