write a program to find the two number in the array of 20 whose product(multiplication) is equal to given number by the user
Answers
Answered by
11
Explanation:
Given an array of distinct elements and a number x, find if there is a pair with a ... A simple C++ program to find if there is a pair ... with product equal to x
Answered by
0
Answer:
// A Python program to find the two number in the array of 20 whose //product(multiplication) is equal to given number by the user
arr1=[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20]
// collect user input
in_pt = int(input("Enter: "))
for i in range(0,20,1):
a = arr[i]
for j in range(0,20,1):
b = arr[j]
// multiply two numbers and check whether product value is equal
//to the user input.
if (a*b)==in_pt:
print(a,"×",b,"=",in_pt)
else:
continue
Similar questions