using System;
namespace ConsoleApp6
{
class Program
{
static double F(double[] u) { return (Math.Pow((u[0] * u[0] + u[1] - 11), 2) + Math.Pow((u[0] + u[1] * u[1] - 7), 2)); }
static void Main(string[] args)
{
Random random = new Random();
double[] u = new double[2];
Console.WriteLine("Enter u1: ");
u[0] = double.Parse(Console.ReadLine());
Console.WriteLine("Enter u2: ");
u[1] = double.Parse(Console.ReadLine());
Console.WriteLine("Enter h: ");
double h = double.Parse(Console.ReadLine());
int i = 1;
double[] a = new double[2];
double[] u1 = new double[2];
do
{
i = 0;
do
{
a[0] = random.NextDouble() - 0.5;
a[1] = random.NextDouble() - 0.5;
u1[0] = u[0] + h * a[0];
u1[1] = u[1] + h * a[1];
i++;
} while ((F(u1) >= F(u)) && i != 100);
Console.WriteLine("u1 = " + u1[0]);
Console.WriteLine("u2 = " + u1[1]);
if (i != 10)
{
u[0] = u1[0];
u[1] = u1[1];
}
} while (i != 100);
Console.WriteLine(u1[0]);
Console.WriteLine(u1[1]);
Console.WriteLine("Hello World!");
Console.ReadLine();
}
}
}
Client's review of cooperation with freelancer
Переписати програму з шарпів на пайтонEverything is great. Fast and quality
Freelancer's review of cooperation with Vika Bulishin
Переписати програму з шарпів на пайтонA wonderful customer.
They resolved very quickly.
I recommend it.
![]()
-
244 6 2 Welcome, I will do it very quickly.
I will write comments for your understanding.
Ready to start immediately.
-
2758 58 0 I will do everything in the best way. and fast. of quality. With the comments!!The !
-
121 3 0 Good morning, I'll rewrite your program from C# to Piton. If necessary, I can comment. I can also drop the price.
-
902 29 1 Good day .
The program is not complicated, I will do it in 15 minutes.
I look forward to your message.
Current freelance projects in the category C#
Creation of a plugin for integration with the POS system Syrve, C#Develop a plugin for the Syrve POS system (on-premise), which is installed on the establishment's server. The plugin must: (1) transmit data to our server in real-time — orders, table statuses, payments, receipts; (2) receive commands from Reservble — booking confirmations,… C#, Web Programming ∙ 1 day 3 hours back ∙ 11 proposals |
Creation or refinement of firmware and logic for three autonomous LoRa stations based on ESP32.
113 USD
Creation or refinement of firmware and logic for three autonomous LoRa stations based on ESP32. The devices must set up a Wi-Fi access point, serve a local site via a browser (HTTP), receive text and images within a radius of 5-10 km (plus or minus), store data (preferably on… C & C++, C# ∙ 1 day 10 hours back ∙ 3 proposals |
S1GG1LA person is needed who can take the initial code of the Minecraft launcher for the project, change the design at their discretion, but there are small style requirements for it to be in purple tones. Regarding payment, please suggest a price for the work. However, the budget is… C#, Gaming Apps ∙ 3 days 18 hours back ∙ 7 proposals |
Improvement in the existing version of 1C retail block for the distribution center (DC)In general, I will explain what kind of database we have - There is a main server where there is a retail database (where all receipts are recorded) - a UTP database - where all sales are transferred - it calculates the markup and stock balances - small databases of retail… C & C++, C# ∙ 8 days 19 hours back ∙ 6 proposals |
It is necessary to migrate the current working program from FoxPro to C#.Hello everyone! We have a program in FoxPro (it has several modules, it's an accounting program), we have the source code of the program, and if necessary, we can consult with people who support the current program. What needs to be done: 1. Analyze how everything works,… C#, Desktop Apps ∙ 11 days 10 hours back ∙ 19 proposals |