Answer to Question #251914 in C# for Holik

Question #251914
1. Two real numbers a and b are given. Get them
sum, difference and product.
1
Expert's answer
2021-10-16T17:23:13-0400
using System;
using System.Collections.Generic;


namespace App
{
   
    class Program
    {
        static void Main(string[] args)
        {
            Console.Write("Ente a: ");
            float a = float.Parse(Console.ReadLine());
            Console.Write("Ente b: ");
            float b = float.Parse(Console.ReadLine());
            float sum=a+b;
            float difference=a-b;
            float product=a*b;
            Console.WriteLine("Sum = {0}", sum);
            Console.WriteLine("Difference = {0}", difference);
            Console.WriteLine("Product = {0}", product);


            Console.ReadLine();
        }
    }
}

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
New on Blog
APPROVED BY CLIENTS