Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Write the following in C, not C++. 1.Write a function called GCF() that takes as

ID: 3770033 • Letter: W

Question

Write the following in C, not C++.

1.Write a function called GCF() that takes as input parameters two positive integers and returns the greatest common factor of those two integers. The greatest common factor is the largest integer that divides evenly into both numbers.

2. Write a program that will read from a file called scores.txt a list of numeric scores. The program will then output the corresponding letter grade for each score read in. After all of the test scotes are read in, the program will output the average test score, highest score, and lowest score to another file named results.txt. In computing the letter grade, use the following grading scale: A (100 - 90), B (89 - 80), C (79 0 70), D (69 65), F (65 - below)

3.Write a program that reads in a 5 digit number and prints out each digit in reverse order. When the program prints out each digit, they should be separated by at least one space. Example: input: 12345 would result in
5   4   3   2   1.

4.Write a program to print the sum of all positive integers from a up to (and including) b where a and b are entered by the user.
Output should be something like this.
Enter first number: 2
Enter second number: 8
The sum of numbers from 2 to 8 is: 35
You must solve the problem without use of a loop.

Explanation / Answer

1.

2.

3.

#include <iostream>
using namespace std;

int main()
{
int a, b, c, d, e;
cout<<"Enter a five digit number with spaces and i will reverse it:"<<endl;
cin>>a>>b>>c>>d>>e;
cout<<e<<" "<<d<<" "<<c<<" "<<b<<" "<<a<<endl;
return 0;
}

4.