0

FLIGHT TIME

You need to calculate the flight time of an upcoming trip. You are flying from LA to Sydney, covering a distance of 7425 miles, the plane flies at an average speed of 550 miles an hour. Calculate and output the total flight time in hours. I CANT UNDERSTAND HOW I WRITE THE PROGRAM PLEASE HELP ME

22nd Feb 2022, 10:02 AM
PUSHPANJALI BADGUJAR
16 odpowiedzi
+ 7
PUSHPANJALI Nice attempt. Your first line uses floor// which gets rid of residual division. Your second line uses modular which only returns the residual. So using your system you could write the following. num = 7425//550 decimal = 7425 %550 print(num + decimal) or you could use the division operator print(7425/550)
22nd Feb 2022, 10:32 AM
Rik Wittkopp
Rik Wittkopp - avatar
+ 4
PUSHPANJALI If you can tell me the mathematical equation to solve this problem, then I can tell you how to write the program.
22nd Feb 2022, 10:09 AM
Rik Wittkopp
Rik Wittkopp - avatar
+ 4
The basic concept of coding is problem solving. You have identified that your math is lacking, so to fix this you must learn how to do this math. Asking for answers to all your problems will not get you far in life, and this is basic math.
22nd Feb 2022, 10:16 AM
Rik Wittkopp
Rik Wittkopp - avatar
+ 4
Please post your code attempt so I may review
22nd Feb 2022, 10:21 AM
Rik Wittkopp
Rik Wittkopp - avatar
+ 4
PUSHPANJALI If you can show the Sololearn community that you have tried to solve this yourself, then everybody who reviews these questions will try to help you. That is why I asked for you to post your attempt.
23rd Feb 2022, 7:43 AM
Rik Wittkopp
Rik Wittkopp - avatar
+ 3
Thank you sir
22nd Feb 2022, 10:33 AM
PUSHPANJALI BADGUJAR
+ 2
I hope next time you always help me and explaining, and solving the problem
22nd Feb 2022, 10:34 AM
PUSHPANJALI BADGUJAR
+ 1
I am not good in math and that's reason I can't understand how to solve this program
22nd Feb 2022, 10:13 AM
PUSHPANJALI BADGUJAR
+ 1
I know but I trying and I am solving this program but they are said its wrong...I don't know how I solve this problem
22nd Feb 2022, 10:19 AM
PUSHPANJALI BADGUJAR
+ 1
print(7425 // 550) And I try print( 7425 % 550)
22nd Feb 2022, 10:27 AM
PUSHPANJALI BADGUJAR
+ 1
Just do a simple division 7425/550
22nd Feb 2022, 10:42 AM
A J
A J - avatar
0
Ok
22nd Feb 2022, 11:46 AM
PUSHPANJALI BADGUJAR
0
#include <iostream> using namespace std; int main() { int D =7425; int S = 550; int T= D/S cout << D << end1; return 0; }
22nd Feb 2022, 4:02 PM
Jojo Emeka
Jojo Emeka - avatar
0
Answer: print(7425 / 550)
24th Feb 2022, 9:26 AM
Dream
Dream - avatar
- 1
Ok
22nd Feb 2022, 10:21 AM
PUSHPANJALI BADGUJAR