I'm fourteen trying this on my own for the first time.
Yes it is for my junior high math class. I am having a few issues.. I have cleared many of my issues up after I found I had left out a lot of {{ type things..
Any help would be greatly appreciated
I am trying to get Euclids lowest common denominator to work
Now I get two error messages:
line 4 invalid function declaration
line 45 expected unqualified-id "{'
Here is my program
#include<iostream>
#include<iomanip>
usingstd: :cout:
usingstd: :cin:
usingstd: :end1:
usingstd: :setw:
int main()
{
int dividend, divisor, remainder, num1, num2 = 0;
cout << "This program finds the GCF of two numbers." << end1 << end1;
cout << "Enter the first number.";
cin >> num1;
cout << end1 << end1;
cout <<"Enter the second number.";
cin >> num2;
cout << end1 << end1;
if(num1 > num2)
{
Dividend=num1;
Divisor=num2;
}
else
{
Dividend=num2;
Divisor=num1;
}
do(
Remainder=dividend%divisor;
If(remainder !=0)
{
Dividend=divisor;
Divisor=remainder;
}
}
{while (remainder !=0); //loop until remainder is zero
cout << "The GCF of " << num1 << "and" << num2 << "is": << divisor << end1 <<end1;
cout << setw(15) << "Proof:" << end1 << end1;
cout << "GCF" << end1;
cout << setw(2) << divisor << "*" << num1/divisor << "=" << (num1/divisor)*divisor << end1
cout << setw(2) << divisor << "*" << num2/divisor << "=" << (num2/divisor)*divisor << end1 << end1;
system("Pause");
return 0:
}