Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace p
- {
- class Program
- {
- public static void Main(string[] args)
- {
- Console.WriteLine("nombre colonne");
- int nombre1 = int.Parse(Console.ReadLine());
- Console.WriteLine("nombre ligne");
- int nombre2 = int.Parse(Console.ReadLine());
- int nbcompteur1 = 1;
- int compteur1 = 0;
- Console.Write("\t");
- //premiere ligne
- while (compteur1 != nombre1)
- {
- Console.Write(nombre1 - nombre1 + nbcompteur1 + " ");
- compteur1++;
- nbcompteur1++;
- }
- Console.WriteLine("\n");
- int colonne = 1;
- int ligne = 0;
- int multiplication = 1;
- while (colonne <= nombre2)
- {
- Console.Write(colonne);
- while (ligne != nombre2)
- {
- Console.Write("\t" + colonne * multiplication);
- multiplication++;
- ligne++;
- }
- if (ligne == nombre2)
- {
- Console.WriteLine("\n");
- }
- colonne++;
- ligne = 0;
- multiplication = 1;
- }
- Console.ReadKey();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement