Computer Science, asked by divyanshikhatri29, 11 months ago

10c
MM 10
Data members -
15/7
Define a class check with the following
description
a, b (integers) to
store two numbers.
Member methods :-
Check () - to initialize data members to
null
2. void input (int x, inty) to accept
two numbers and assign their
values to data members
3 int calc_heffint, int) – calculates and
returns the hef of the two numbers.
int
prime lint, int) - checks whether
the numbers are prime numbers or
not. Returns 1 it is for numbers
are prime numbers otherwise returns o.
write main () to create the object of
class and call the above members
method to check and print whether
values in variables a and b are co-prime
or not (Note: Two numbers are co-prime
numbers if both are prime and their
hef is 1)
4​

Answers

Answered by alka06saini
1

Answer:

please ask only one question

Similar questions