When a program lets the user know that an invalid choice has been made, this is known as a error message.
OSHA standards appear in the Code of Federal Regulations (CFR) <span>and was then broken down into two parts. It contains standards to ensure a </span>
Computer hardware includes the physical parts of a computer, such as the case, central processing unit (CPU), monitor, mouse, keyboard, computer data storage, graphics card, sound card, speakers and motherboard. By contrast, software is the set of
Answer: sorry i need points to ask a question hope u understand...
Explanation:
Answer:
// here is code in c++.
#include <bits/stdc++.h>
using namespace std;
// function that return greatest common divisor
int g_c_d(int num1, int num2)
{
if (num1 == 0)
return num2;
return g_c_d(num2 % num1, num1);
}
// main function
int main()
{
// variables
int num1,num2;
cout<<"enter two numbers:";
// read two numbers from user
cin>>num1>>num2;
// call the function and print the gcd of both
cout<<"greatest common divisor of "<<num1<<" and "<<num2<<" is "<<g_c_d(num1.num2)<<endl;
}
Explanation:
Read two numbers from user and assign them to variables "num1" and "num2".Call the function g_c_d() with parameter "num1" and "num2".According to Euclidean algorithm, if we subtract smaller number from the larger one the gcd will not change.Keep subtracting the smaller one then we find the gcd of both the numbers.So the function g_c_d() will return the gcd of both the numbers.
Output:
enter two numbers:5 9
greatest common divisor of 5 and 9 is 1
enter two numbers:-25 15
greatest common divisor of -25 and 15 is 5