ecuacion

Hola como están

tengo la siguiente ecuación:
F=(G*m1*m2)/(d*d);

donde m1 y d son constantes, pero m2=2000,
necesito un código que produzca una tabla con 1000 datos para m2 y F es decir que imprima para m2 1000 datos de 0 hasta el valor de m2 que es 2000 y lo mismo para F, teniendo encuenta la ecuación.
porfavor ayuda con esto
gracias.
closed account (3hM2Nwbp)
Hi there, you might have better luck posting in English.

Translator wrote:
Hello how are

I have the following equation:
F = (G * m1 * m2) / (d * d);

where m1 and d are constant, but m2 = 2000,
I need a code that produces a table with 1000 m2 and F data that is printed for m2 1000 data from 0 to the value of which is 2000 m2 and the same for F, having encuenta the equation.
please help with this
thanks.


1) "encuenta" - Que es umm este (I think it's este for that?)?

2) Does the table need to be saved to a file, or do you need a 2D array in memory?

Translator wrote:
1) "encuenta" - ¿Cuál es esa palabra?

2) ¿Tiene la tabla deben ser guardados en un archivo, o necesita una matriz 2D en la memoria?
Last edited on
1) "encuenta" - Que es umm este (I think it's este for that?)?

I don't know Spanish, but I looked this up. It should be en cuenta, with the phrase teniendo en cuenta la ecuación meaning literally "bearing in mind the equation", i.e. the values for m2 and F must satisfy the equation.

From what I understand, you want the results of the equation with m2 going from 0 to 2000 with 1000 data. You should start m2 at 2 and then increment it by 2 until it reaches 2000. At each iteration, compute F and print m2 and F. You should use a while loop to do this. You should use cout from the iostream header for printing.

Example:

Translator wrote:
Por lo que entiendo, desea que los resultados de la ecuación de m2 que van de 0 a 2000 con datos de 1000. Usted debe comenzar m2 en 2 y luego incrementarlo en 2 hasta llegar a 2000. En cada iteración, se calcula F y de impresión m2 y F. Usted debe utilizar un "while loop" para hacer esto. Usted debe usar "cout" de la "iostream header" para la impresión.

Ejemplo:


1
2
3
4
5
6
7
8
float m2 = 2;
while(m2 <= 2000)
{
      //calcular F aquí
      //imprimir m2 y F aquí

      m2 += 2;
}
Last edited on
@shacktar:
I'm pretty sure that cuenta is bill, but dictionary.com's translator says that t is account. Either way, probably not the word were looking for.
dictionary.com's translator says that t is account

I was wrong about the literal translation. It should be "taking into account the equation". "Bearing in mind" is one step removed from that. It's still the correct meaning though.
Last edited on
Está bien, OP. No sabés inglés. Eso lo puedo entender. ¿Podrías por lo menos molestaste en fijarte lo que escribís para que los que no saben español no necesiten adivinar lo que quisiste decir? ¿O eso también es mucho pedir?

Okay, OP. You don't speak English. I can understand that. Could you at least bother to proofread what you write so the people who don't speak Spanish don't need to guess what you meant? Or is that too much to ask, too?
Last edited on
Lately, it IS much to ask for people to write full sentences, much more to ask for sentences with punctuation (or accents in Spanish). People are spoiled by cell texting and chatting. That's just how it is. And for the record: I do hate it as well. :-(

Love your use of the opening question mark, though. Not even I use it most of the time, and it's my native language.
Topic archived. No new replies allowed.