Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
HSC
//Rextester.Program.Main is the entry point for your code. Don't change it. //Compiler version 4.0.30319.17929 for Microsoft (R) .NET Framework 4.5 using System; using System.Collections.Generic; using System.Linq; using System.Text.RegularExpressions; namespace Rextester { public class Program { public static void Main(string[] args) { //Your code goes here string[] names = {"COGO:400", "BOC:3988", "CCB:939","SHENGHAI:1676", "CX:293", "XM:1810"}; float[] originals = {4.55f, 3.54f, 7.54f, 0.54838f, 13f, 11.18f}; float[] nows = {3.02f, 3.6f, 6.94f, 0.237f,13.6f,11.38f}; float [] amount = {18000f,30000f,30000f,272000f,5000f,10000f}; float x = 0.003577f; float tot = 0; for(int i = 0; i<originals.Count();i++){ Console.WriteLine(names[i]); tot+=Calc(nows[i],originals[i],amount[i],x); } Console.WriteLine(tot); } public static float Calc(float n, float o, float s, float x){ var ans = (n-o-o*x-n*x)*s; Console.WriteLine(ans); return ans; } } }
run
|
edit
|
history
|
help
0
TotalHours FromTicks
DateTime With TimeZone to UTC DateTime
SevenSevenSeven
Order of Ops 6.0 (Added Easy and Medium)
Hexagon Tringle
Check if string is palindrome
new
Fórum ➡ Get all combinations for ▶different◀ Id's ♦
qwerty
free robux