Please Somone help with this question ASAP

-write a function that receives two positive integers x and y. The function calculates and returns the greatest common factor of those two numbers.

Please Help me
nothing there please help me doing this program
Here, this works, just change it to interact with the user how you need.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#include <iostream>

using namespace std;
int gcf(int (&numOne),int (&numTwo));
int main()
{
    int numOne, numTwo;
    cin >> numOne >> numTwo;
    gcf(numOne, numTwo);
    return 0;
}
int gcf( int (&numOne), int (&numTwo))
{
 int i;
 int result = 0;

 for(i = 1; i <= numOne && i <= numTwo; i++)
 {
  if( numOne % i == 0 && numTwo % i == 0)
  result = i;
 }
 cout << result;
return 0;
Thank you for the help, can you please do this one I don't know how to do it:

write a function that receives an positive integers x, and then display following matrix:
11 12 13...1x
.
.
x1 x2 x3...xx

For example ,if the number that the function receive is 4, then the function should display a matrix as following:
11 12 13 14
21 22 23 24
31 32 33 34
41 42 43 44

Please help.. Thanxx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#include <iostream>

using namespace std;
int main()
{
    int x;
    cin >> x;
    for (int y = 1; y <= x; ++y)
    {
        for (int z = 1; z <= x; ++z)
        {
            cout << y << z << " ";
        }
        cout << "\n";
    }
    return 0;
}
Thank you.
Np, what is it for?
can you please help me doing this too, I really appreciated your help

Write a function that receives a positive integer and has no return value. The function should print out all the primes that less than or equal to the number it receives. For example, if the number the function receives is 17. Then it should print out a list of the following numbers: 1, 2, 3, 5, 7, 11, 13, 17.
can you do I please
can you do it please..
I have class, I can't do it for a while.
Thank you i did it..
Topic archived. No new replies allowed.