1a. Create an application that obtains four int values from the user and displays the product.

Program:


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Prac1_a
{
 class Program
 {
 static void Main(string[] args)
 {
 int num1, num2, num3, num4, product;
 Console.Write("Enter number 1: ");
 num1 = Int32.Parse(Console.ReadLine());
 Console.Write("Enter number 2: ");
 num2 = Int32.Parse(Console.ReadLine());
 Console.Write("Enter number 3: ");
 num3 = Int32.Parse(Console.ReadLine());
 Console.Write("Enter number 4: ");
 num4 = Int32.Parse(Console.ReadLine()); 
product = num1 * num2 * num3 * num4;
 Console.WriteLine("Product is: "+num1+"*"+num2+"*"+num3+"*"+num4+"="+product);
 Console.ReadLine();
 }
 }
}



Comments