Answer to Question #247372 in C# for Fiks

Question #247372
You have been tasked to create a new thread that will print the multiplication table of 10 and the Main

Thread will print the table of 15, they should be communication between these two threads, in such a

way that table of 10, is printed before multiplication table of 15, to maintain an ascending order.
1
Expert's answer
2021-10-06T06:17:10-0400
using System;  
public class Exercise6  
{  
    public static void Main() 
{
   int j,n;
   
	Console.Write("\n\n");
    Console.Write("Display the multiplication table:\n");
    Console.Write("-----------------------------------");
    Console.Write("\n\n");   

   Console.Write("Input the number (Table to be calculated) : ");
   n= Convert.ToInt32(Console.ReadLine());   
   Console.Write("\n");
   for(j=1;j<=10;j++)
   {
     Console.Write("{0} X {1} = {2} \n",n,j,n*j);
   }
  }
} 

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
APPROVED BY CLIENTS