39 AnswersNew Answer
39 AnswersNew Answer
* There is 1 closing } to many * remove the : * would outputting S only once be enough?
"I was given math homework to solve this with c ++" Кинжакулов Арсен and your attempt? we want to see if you actually put some effort into doing it. even if you did it wrong or it is incomplete. although it looks more like a physics question than a mathematical one. "Rellot's screwdriver I don’t know what C ++ is. I don’t understand what it is." WHAAAAT "We had only one lesson in C ++ and I didn't understand anything. I wanted to see how problems are solved using C ++. And this was given to us for homework.Rellot's screwdriver" oh now it makes sense, although it's not so complicated for us to solve it but for you it's gonna be as confusing as you're a complete beginner
Okay, what does S mean?
Can you please link your code? It looks incomplete and it is unclear to me what you are trying to do...
You can approach the task like this: * assign values to variables of appropriate data type * calculate s with the given formula * output s
Did you test your own code? * you forgot to specify the type of S * I don't understand S: ? * How does the formula relate to the formulae that you wrote previously? (You can test your code here on sololearn playground)
Great you could solve it now! :) Keep learning!
Depends on what your formula is supposed to do ;) The difference between float and double is precision (number of bits to store the value)
Кинжакулов Арсен it's just that doesn't make sense to me as what you were trying to get with (v1*t1)+(v1-v2)*t2 ? difference between two distances?
Rellot's screwdriver yes
I was given math homework to solve this with c ++.
s is the distance v is speed t is the time s = t * v v = s: t t = s: v
i need to solve with c ++
Rellot's screwdriver I don’t know what C ++ is. I don’t understand what it is.
We had only one lesson in C ++ and I didn't understand anything. I wanted to see how problems are solved using C ++. And this was given to us for homework.Rellot's screwdriver Lisa
float t1=2,t2=4,v1=6,v2=4; S=(v1*t1)+(v1-v2)*t2; cout<<S:<<S; Rellot's screwdriver Lisa right?
I decided everything, I blunted myself ...
Lisa thank you,to solve this, I spent an hour and a half ...
Sololearn Inc.4 Embarcadero Center, Suite 1455
Send us a message