equation

Equation of 1 22 333 4444 55555 sequence?

孤者浪人 提交于 2019-12-10 12:27:55
问题 i need to find 1 22 333 sequence formula/equation. I write this code for getting number like that but i need to find equation of this sequence Code: for (int i = 1; i <= 9; i++) { for (int j = 0; j < i; j++) { Console.Write(i); } Console.Write("\n"); } With this code I get this results 1 22 333 4444 55555 666666 7777777 88888888 999999999 Also Latex code line should works for me to. I mean equation somethings like this for example: 回答1: From the sum of a geometric progression , the value of

Equation Solvers for linear mathematical equations

淺唱寂寞╮ 提交于 2019-12-09 19:06:36
问题 I need to solve a few mathematical equations in my application. Here's a typical example of such an equation: a + b * c - d / e = a Additional rules: b % 10 = 0 b >= 0 b <= 100 Each number must be integer ... I would like to get the possible solution sets for a, b, c, d and e. Are there any libraries out there , either open source or commercial, which I can use to solve such an equation ? If yes, what kind of result do they provide? 回答1: Solving linear systems can generally be solved using

JavaScript equation solver library

强颜欢笑 提交于 2019-12-09 05:19:39
问题 Is there a JavaScript library or function that will solve equations for variables? Such as 9 = 3 + x and solve for x. But it should also solve more advanced equations that include sine, cosine, and tangent. 回答1: You can approximate the solution by doing what excel calls "Goal Seek" - testing values for x until both sides of the equation approximately match. You can do this by splitting the equation by the "=" sign, replacing each occurence of x with a value, eval ing both sides, and

solution of an implicit equation with fzero on MATLAB

主宰稳场 提交于 2019-12-08 19:28:26
I've been trying to solve this implicit equation by using fzero in MATLAB. File that holds the code is named as "colebrook" and I've typed so far is as below. D = input('Please enter the pipe diameter in meters: '); V = input('Please enter the fluid velocity in m/s: '); rho = input('Please enter fluid density in kg/m^3: '); mew = input('Please enter fluid viscosity in kg/m*s: '); Re = D*V*rho/mew; eps = input('Enter absolute roughness in milimeters: '); eD = eps/(D*1000); a = fzero(colebrookfunc,0.1); fprintf(a); Equation that I want to solve is kept in another m-file called "colebrookfunc" ,

How to make C find all different symbol (+,-,*,/) combinations to have a certain output [closed]

拜拜、爱过 提交于 2019-12-08 12:18:51
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed last year . I have the following equation : 8 ? 7 ? 6 ? 5 ? 4 ? 3 ? 2 ? 1 = 36 and I need to make a C program that finds which operators ( from +, -, *, / ) go instead of ? in order to make the equation true. My initial thought is that I have 4*7=28 different combinations. So I started making

Solving a system of equations programmably? [duplicate]

泪湿孤枕 提交于 2019-12-07 18:50:32
问题 This question already has answers here : Closed 9 years ago . Possible Duplicate: System of linear equations in C++? I have the following 2 systems of equations: For a,b,c,d: 0 = a * r1_x + b * r1_x * r1_y + c * r1_y + d 1 = a * r2_x + b * r2_x * r2_y + c * r2_y + d 0 = a * r3_x + b * r3_x * r3_y + c * r3_y + d 1 = a * r4_x + b * r4_x * r4_y + c * r4_y + d For e,f,g,h: 0 = e * r1_x + f * r1_x * r1_y + g * r1_y + h 0 = e * r2_x + f * r2_x * r2_y + g * r2_y + h 1 = e * r3_x + f * r3_x * r3_y +

Creating a function that takes an equation given as a string and computes it [duplicate]

╄→尐↘猪︶ㄣ 提交于 2019-12-06 16:54:35
This question already has answers here : Evaluating a mathematical expression in a string (11 answers) Closed 4 years ago . As part of an assignment, I am creating a function that takes in a string, which is an equation. here is an example of one: 48+6x6/3=6x8-9x2. The compute function takes one side of the equal sign and evaluates it. I am not too concerned with splitting the equation. I believe I can just slice it with s[:s.find("=")] . My main problem is the compute function itself. I will post where I am with it so far. The commented out part was stuff I was trying to deal with double

Split screen based on number of items and screen ratio

时光毁灭记忆、已成空白 提交于 2019-12-06 13:51:58
问题 I have to split the screen equally (as possible) given a dynamic number of items. So i need to find the number of columns and rows based on the screen size/ratio. Each item size is not important since i will calculate them in % based in the items per col and row. If i have 5 items, then (depending on the screen ratio) i will probably have 3 columns in the 1st row and 2 columns in the 2nd row. That's ok. 回答1: First you have to decide what you mean with "divide the screen equally". It probably

How to calculate mean based on number of votes/scores/samples/etc?

余生颓废 提交于 2019-12-06 12:52:49
问题 For simplicity say we have a sample set of possible scores {0, 1, 2}. Is there a way to calculate a mean based on the number of scores without getting into hairy lookup tables etc for a 95% confidence interval calculation? dreeves posted a solution to this here: How can I calculate a fair overall game score based on a variable number of matches? Now say we have 2 scenarios ... Scenario A) 2 votes of value 2 result in SE=0 resulting in the mean to be 2 Scenario B) 10000 votes of value 2 result

Plotting equation to cartesian plane

爷,独闯天下 提交于 2019-12-06 12:38:54
问题 I am trying to plot a two variable equation to a Cartesian plane. Here is my problem, on the code below if I comment out one for loop and let another run, the plot of the graph (the negative or positive sides of x) is correct, but if I run both for loops they seem to alter each other and the graph comes out wrong. I've tried every combination of for loops, looping frontward, backward, nothing seems to solve it. I commented out the where these loops are at the end of the class "public class