Pages

WRITE A PROGRAME TO CALCULATE AND PRNT THE TOTAL SECTION in a CHAPTER:

INPUT:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Chapter_calculator
{
    class Program
    {
        static void Main(string[] args)
        {
            int chapter, section;
            Console.WriteLine("Enter The Chapter ");
            chapter = Convert.ToInt32(Console.ReadLine());
            Console.WriteLine("Enter The Section");
            section = Convert.ToInt32(Console.ReadLine());
            Console.WriteLine("chapter no");
            for (int i = 1; i <= chapter; i++)
            {
                Console.WriteLine(" {0}", i);
                for (int j = 1; j <= section; j++)
                {
                    Console.WriteLine(" {0}.{1}", i, j);
                }
            }
        }
    }
}


OUTPUT:


No comments:

Post a Comment