Yahya and Mathematics are very close friends, they even call themselves the algebros. The algebros decided to go cruising one day. The trip will take hours to complete. It starts by travelling dkm to the Numbers Island, spending y hours at the island, then leaving the island and going back to the starting point using the same path. The water current goes toward the island with a speed of vkm/hour, so their journey toward the island will be faster than their journey back If you know that the ship's base speed [its speed without the effect of the waves) was constant the whole time, can you figure out the ship's base speed, and how much time did it take to complete the first half of their trip to reach the Island? The problem guarantees that there is always only one correct answer

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

In C Programming Language solve the following program 

Yahya and Mathematics are very close friends, they even call themselves the algebros. The algebros decided to go cruising one day. The trip will take hours to complete. It starts by travelling dkm to the Numbers Island,
spending y hours at the island, then leaving the island and going back to the starting point using the same path. The water current goes toward the island with a speed of v km/hour, so their journey toward the island will
be faster than their journey back.
If you know that the ship's base speed [its speed without the effect of the waves) was constant the whole time, can you figure out the ship's base speed, and how much time did it take to complete the first half of their trip
to reach the island?
The problem guarantees that there is always only one correct answer.
Input
The input consists of four Integers, h, d, y, and v, respectively.
Output
Print two space-separated numbers, the speed of the ship, and the time it took them to finish the first half of their trip to reach the island.
Examples
Input
5612
Output
4.00 1.00
Transcribed Image Text:Yahya and Mathematics are very close friends, they even call themselves the algebros. The algebros decided to go cruising one day. The trip will take hours to complete. It starts by travelling dkm to the Numbers Island, spending y hours at the island, then leaving the island and going back to the starting point using the same path. The water current goes toward the island with a speed of v km/hour, so their journey toward the island will be faster than their journey back. If you know that the ship's base speed [its speed without the effect of the waves) was constant the whole time, can you figure out the ship's base speed, and how much time did it take to complete the first half of their trip to reach the island? The problem guarantees that there is always only one correct answer. Input The input consists of four Integers, h, d, y, and v, respectively. Output Print two space-separated numbers, the speed of the ship, and the time it took them to finish the first half of their trip to reach the island. Examples Input 5612 Output 4.00 1.00
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Processes of 3D Graphics
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education