Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Russy P. Mitts and Danny Scotts like programming, but Russy P. Mitts practices more than Danny Scotts. Not wanting to fall behind, Danny Scotts resolves

image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
Russy P. Mitts and Danny Scotts like programming, but Russy P. Mitts practices more than Danny Scotts. Not wanting to fall behind, Danny Scotts resolves to practice more. They each solve a number of problems in a day, Russy P. Mitts has already solved more problems than Danny Scotts. What is the minimum number of days it will take for Danny Scotts to have solved more problems than Russy P. Mitts? For example, if Russy P. Mitts is 5 problems ahead of Danny Scotts and they solve 3 and 5 problems a day. Russy P. Mitts will be ahead by only 3 after the first day, 1 after the second and Danny Scotts will pass Russy P. Mitts on day 3.- Function Description Complete the function minnum in the editor below. The function must return the minimum number of days needed by Danny Scotts to catch up, on trit's impossible, min Num has the following parameters) R: Number of problems Russy P. Mitts solves in a day D: Number of problems Danny Scotts solves in a day Number of problems Russy P. Mitts is ahead to begin Constraints 1 SRD S 100 OP 100 Input Format For Custom Testing Input from stdin will be processed as follows and passed to the function The first line contains an integer R The second line contains an integer D. The third line contains an integer P. Sample Case o Sample Input Sample Output Explanation Russy P. Mitts is 1 problem ahead of Danny Scots to be problems Aftet da n no vill ha Russy P itts will have only solved + 3 = 4 Constraints 1 s RDS 100 Os Ps 100 Input Format For Custom Testing Input from stdin will be processed as follows and passed to the function! The first line contains an integer R The second line contains an integer D. The third line contains an integer P. Sample Case o Sample Input Sample Output Explanation Russy P. Mitts is 1 problem ahead of Danny Scotts to begin. After 1 day passes. Danny Scotts will have solved 5 problems while Russy P. Marts will have only sowed 134 problems Sample Case 1 Sample Input Sample Output Explanation Russy P. Mitts is 1 problem ahead of Danny Scotts to begin. After 1 day passes, Danny Scotts will have solved 5 problems wie Rusty P. Mitts will have also solved 1.4.5 problems. On the second day, Danny Scotts will surpass Russy P. Mitt 55 44 View Code Diff 1 include ... le * Complete the 'minum function below. * The function is expected to return an INTEGER * The function accepts following parameters: 1. INTEGER R 2. INTEGER D 3. INTEGER P 17 19 20 int minlium(int R, int n, int p) { 22 ) 23 24 int main()

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Graph Databases In Action

Authors: Dave Bechberger, Josh Perryman

1st Edition

1617296376, 978-1617296376

More Books

Students also viewed these Databases questions

Question

=+industrial action Under what circumstances can unions strike?

Answered: 1 week ago

Question

=+What forms of industrial action are common?

Answered: 1 week ago