Read two integer values. After this, calculate the product between them and store the result in a variable named PROD. Print the result like the example below. Do not forget to print the end of line after the result, otherwise you will receive “Presentation Error”.

Solution
Before seeing the solution make sure that you tried enough. Don’t paste the whole code, just find out the logic
using System;

namespace _1004_Simple_Product
{
    class Program
    {
        static void Main(string[] args)
        {
            int A, B, PROD;
            A = Convert.ToInt32(Console.ReadLine());
            B = Convert.ToInt32(Console.ReadLine());
            PROD = A * B;
            Console.WriteLine("PROD = " + PROD);

            Console.ReadKey();
        }
    }
}

Post a Comment

Previous Post Next Post