Solution de tp3 java pdf Solution de TP package TP public class Lettre public static String a ?chageNombre int n String tabdiz dix vingt trente quarante cinquante soixante soixante-dix quatre-vingt quatre- vingt-dix String tabunit zero un deux trois quatr

Solution de TP package TP public class Lettre public static String a ?chageNombre int n String tabdiz dix vingt trente quarante cinquante soixante soixante-dix quatre-vingt quatre- vingt-dix String tabunit zero un deux trois quatre cinq six sept huit neuf String tabautre onze douze treize quatorze quinze seize int unite diz unite n diz n if n Cas return cent else if diz Nombres inférieurs à return tabunit unite else if unite Nombres dont l'unité est return tabdiz diz else if diz unite Nombres entre et return tabautre unite else if unite Nombres dont l'unité est if diz return tabdiz diz- et tabautre unite else if diz return tabdiz diz - tabunit unite else if diz return tabdiz diz- - tabautre unite else return tabdiz diz et tabunit unite else if n return tabdiz diz s Celse if diz diz unite à et à return tabdiz diz- - tabautre unite else Tous les autres cas return tabdiz diz - tabunit unite package TP import java util Scanner public class Testconversion public static void main String args TODO Auto-generated method stub Scanner s new Scanner System in System out println Entrer un nombre n int n s nextInt s close System out println Lettre a ?chageNombre n n Boucle pour tout véri ?er System out println n n Voici tous les nombres de à for int i i i System out println Lettre a ?chageNombre i C

  • 35
  • 0
  • 0
Afficher les détails des licences
Licence et utilisation
Gratuit pour un usage personnel Aucune attribution requise
Partager