Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace _9gag
- {
- class Program
- {
- static void Main(string[] args)
- {
- //http://9gag.com/gag/aVDbqxK
- //result: 3,50 4,50 9,50 3,50
- decimal a = 0.0m;
- decimal b = 0.0m;
- decimal c = 0.0m;
- decimal d = 0.0m;
- for (a = 1.0m; a <= 8.0m; a+=0.1m)
- {
- for (b = 1.0m; b <= 8.0m; b+=0.1m)
- {
- for (c = 1.0m; c < 10.0m; c +=0.1m)
- {
- for (d = 1.0m; d <=8.0m; d +=0.1m)
- {
- // Console.WriteLine($"{a:f2} {b:f2} {c:f2} {d:f2}");
- if ( (a+b) == 8.0m && (a+c) ==13.0m && (b+d) == 8.0m && (c - d) == 6.0m)
- {
- Console.WriteLine($"{a:f2} {b:f2} {c:f2} {d:f2}");
- break;
- }
- }
- }
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement