Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace Multiplication_Table
- {
- class Program
- {
- static void Main(string[] args)
- {
- int multiplyWith = Convert.ToInt32(args[0]);
- if (multiplyWith > 0 && multiplyWith <= 20)
- {
- Console.WriteLine("<!DOCTYPE html>");
- Console.WriteLine("<html>");
- Console.WriteLine("<head>");
- Console.WriteLine(" <title> Multiplication table </title>");
- Console.WriteLine("</head>");
- Console.WriteLine("<body>");
- Console.WriteLine(" Multiplication for number " + multiplyWith);
- Console.WriteLine(" <table>");
- for (int i = 1; i <= 10; i++)
- {
- Console.WriteLine(" <tr>");
- Console.WriteLine(" <td>" + i + "</td>");
- Console.WriteLine(" <td>" + i * multiplyWith + "</td>");
- Console.WriteLine(" </tr>");
- }
- Console.WriteLine(" </table>");
- Console.WriteLine("</body>");
- Console.WriteLine("</html>");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement