Given two point charges
q1andq2, located at a distancedfrom each other. Write a program that calculates the strength of their mutual attraction. The proportionality coefficient isk = 1/4πϵ0, whereϵ0≈ 8.85 × 10 −12 fm.The answer to withdraw in the form: "The force of attraction between the charges
q1C andq2C, located at a distance ofdm, is equal toFN.". Instead of letter symbols, there should be concrete numbers with an accuracy of 2 decimal places. Before prompting for input from the keyboard, display a hint.
using System; namespace ConsoleApplication1 { class Program { static void Main() { double q1, q2, d, k, F; Console.WriteLine("Вычисление силы взаимного притяженияю. Введите q1,q2 и d (расстояние между ними) : "); Console.ReadKey(); Console.WriteLine("Вместо буквенных обозначений должны стоять конкретные числа с точностью до 2-го знака после запятой. Введите q1 : "); q1 = Convert.ToDouble(Console.ReadLine()); Console.WriteLine("Введите q2 : "); q2 = Convert.ToDouble(Console.ReadLine()); Console.WriteLine("Введите d(расстояние между ними) : "); d = Convert.ToDouble(Console.ReadLine()); k = 1 / 4 * 8.85 * 10^(-12); F = k * q1 * q2 / d; Console.WriteLine("" + F); Console.ReadLine(); } } }