Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Numerics;
- namespace SoftuniExercisesWithVariables
- {
- class Program
- {
- static void Main(string[] args)
- {
- Console.WriteLine("Enter the first float number: ");
- float firstFloat = float.Parse(Console.ReadLine());
- Console.WriteLine("Enter the second float number: ");
- float secondFloat = float.Parse(Console.ReadLine());
- float floatCheck = 0.000001f;
- if(Math.Abs(firstFloat-secondFloat) < floatCheck)
- {
- Console.WriteLine("The floats are equal.");
- }
- else
- {
- Console.WriteLine("The floats are not equal.");
- }
- }
- }
- }
Add Comment
Please, Sign In to add comment