Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentes Révision précédente Prochaine révision | Révision précédente | ||
cours:exercicespoobat4avance [2013/11/20 16:55] tigli [Calcul des nombres d’Armstrong] |
cours:exercicespoobat4avance [2013/11/20 16:59] tigli [Calcul des nombres d’Armstrong] |
||
---|---|---|---|
Ligne 23: | Ligne 23: | ||
<code> | <code> | ||
class ApplicationArmstrong { | class ApplicationArmstrong { | ||
- | + | static void Main(string[ ] args) { | |
- | static void Main(string[ ] args) { | + | …….. |
- | …….. | + | } |
- | } | + | |
} | } | ||
</code> | </code> | ||
Ligne 38: | Ligne 37: | ||
namespace CsExosAlgo1 | namespace CsExosAlgo1 | ||
{ | { | ||
- | class ApplicationArmstrong { | + | class ApplicationArmstrong { |
- | static void Main(string[ ] args) { | + | static void Main(string[ ] args) { |
- | int i, j, k, n, somcube; | + | int i, j, k, n, somcube; |
- | System.Console.WriteLine("Nombres d’Armstrong:"); | + | System.Console.WriteLine("Nombres d’Armstrong:"); |
- | for(i = 1; i<=9; i++) | + | for(i = 1; i<=9; i++) |
- | for(j = 0; j<=9; j++) | + | for(j = 0; j<=9; j++) |
- | for(k = 0; k<=9; k++) | + | for(k = 0; k<=9; k++) |
- | { | + | { |
- | …… | + | …… |
- | } | + | } |
- | } | + | } |
- | } | + | } |
} | } | ||
</code> | </code> | ||
Ligne 64: | Ligne 63: | ||
{ | { | ||
static string compresser ( string s ) | static string compresser ( string s ) | ||
- | { ….. | + | { ….. |
} | } |