Exercice en c++

Résolu
Bonjour,lé programmeur j ai un petit pb
j ai un exercice en language c++ et j arrive po a trouver la solution
voila l'exer
1
12
123
1234
12345
123456
1234567
12345678
123456789
..........
l 'utilisateur donné le nombre de ligne a afficher par ex demande 5 la résultat
1
12
123
1234
12345
Configuration: Windows XP
Firefox 2.0.0.14

3 réponses

  1. merci bcp c claire thx man
    0
    1. ---------------------------------------------------------
      # include <stdio.h>

      main ()
      {
      printf ("Donnez le nombre de ligne = ");
      scanf ("%d",&n);

      for (t=1;t<=n;t++)
      {
      for (h=1;h<=t;h++)
      {
      printf ("%d",h);
      }
      printf ("\n");
      }
      getch ();
      }
      -------------------------------------------------------
      0
      1. Contributeur
        void main
        {
        int nb;
        cout<<"lignes"<<endl;
        cin>>nb;

        char* text= new char[nb+1];

        for (int i=0;i<nb;i++)
        {
        text[i]=i+1;
        text[i+1]='0';
        cout<<text<<endl;
        }

        cout<<endl<<"ton prof va tricard que tu l as pas fait toi meme"<<endl;
        }
        1
        1. merci bcp man and am sorry pour te dérangement thx
          0