Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

INSTRUCTIONS Description Submissions EASY In Progress Easy John is a student who recently learned about factors in his math class. His teacher gave him a

INSTRUCTIONS
Description
Submissions
EASY
In Progress Easy
John is a student who recently learned about factors in his math class.
His teacher gave him a number K and asked him to find the smallest factor of K that is present within the range of M to N(inclusive).
Help John solve this problem.
Given three numbers K,M and N, write a program that reads K.M and N and prints the smallest factor of 'K' that is present within the range of 'M' to N'(inclusive). If no factor is found within the given range, print =-1 :
Input
The first tre of input contains a single integer representing K the gven number,
The second tine of input contains two space-separated integers representing the range M and N
Output
Custoi
image text in transcribed

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_2

Step: 3

blur-text-image_3

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

The Manga Guide To Databases

Authors: Mana Takahashi, Shoko Azuma, Co Ltd Trend

1st Edition

1593271905, 978-1593271909

More Books

Students also viewed these Databases questions