C# Çarpım Tablosu Örneği

S

Shiva

Veteran
Joined
Jul 31, 2019
Messages
4,067
Reaction score
13,321
Location
Berlin
Bu örneğimizde iç içe For Döngüsü kullanarak basit bir çarpım tablosu oluşturacağız.


C# Console Application oluşturulan iki farklı örneğe ait kodlar ve ekran çıktısı aşağıdadır.

Örnek 1:

Kodlar:


C#:
static void Main(string[] args)
        {   //www.realitycheats.com
            for (int j = 1; j <= 10; j++)
            {
                for (int i = 1; i <= 10; i++)
                {
                    Console.Write("{0}*{1}={2}\t", i, j, (i * j));
                }
                Console.WriteLine();
            }
            Console.ReadKey();
        }

Ekran Çıktısı:
1580078518245.png

Örnek 2:

Kodlar:


C#:
static void Main(string[] args)
        {   //www.realitycheats.com
            for (int i = 1; i <= 10; i++)
            {
                for (int j = 1; j <= 10; j++)
                {
                    Console.WriteLine("{0}*{1}={2}", i, j, (i * j));
                }
                Console.WriteLine("=============");
            }
            Console.ReadKey();
        }

Ekran Çıktısı:
1580078557525.png
 
SPAM IS FORBIDDEN!
  • SPAMMERS ARE BANNED FROM THE FORUM AND CANNOT USE ANY OF THE CHEATS
  • For example: thanks, thx, very good, asdqwe, working, ty and so on!
  • For example: Writing the same message over and over. thanks, thx and so on!
  • Copying and copying someone else's message is prohibited.
  • It is forbidden to send messages to increase the number of comments on threads that you have no knowledge of.
  • Write your own opinion when commenting!
  • If you see spam message, please let us know with the REPORT button!

Tema düzenleyici

Top Bottom