I'm extremely new with programming, and I mostly pieced this together straight out of textbooks, but I cannot get the damn thing to work. For some reason, my doubles (F1 for example) say that they haven't been declared. Here's the code.
// Vector Resultant Calculator by Jeffrey Weissman
#include <iostream>
#include <string>
#include <vector>
using namespace std;
int main()
{
double F1 = 0, double F2 = 0, double F3 = 0, double F4 = 0; // The initial forces
double A1 = 0, double A2 = 0, double A3 = 0, double A4 = 0; // The initial angles
double F1x = 0, double F2x = 0, double F3x = 0, double F4x = 0; // The calculated horizontal components
double F1y = 0, double F2y = 0, double F3y = 0, double F4y = 0; // The calculated vertical components
double Rx = 0, double Ry = 0, double R = 0, double RA = 0; // The calculated attributes of the Resultant Vector R
string unit; // The unit of the force magnitudes
std::cout << "Welcome to Jeffrey Weissman's Vector Resultant Calculator./n To begin, please enter the magnitude of the first vector. For now, please ignore all units.";
std::cin >> F1;
std::cout << "Thank you. Please enter the angle, in degrees, of the vector. Please count the angle counterclockwise from the x axis.";
std::cin >> A1;
std::cout << "Thank you. Please enter the magnitude of the second vector.";
std::cin >> F2;
std::cout << "Thank you. Please enter the angle, in degrees, of the vector. Please count the angle counterclockwise from the x axis.";
std::cin >> A2;
std::cout << "Thank you. Please enter the magnitude of the third vector. If there is not a third vector, please enter 0";
std::cin >> F3;
std::cout << "Thank you. Please enter the angle, in degrees, of the vector. Please count the angle counterclockwise from the x axis. If there is not a third vector, please enter 0.";
std::cin >> A3;
std::cout << "Thank you. Please enter the magnitude of the fourth vector. If there is not a fourth vector, please enter 0";
std::cin >> F4;
std::cout << "Thank you. Please enter the angle, in degrees, of the vector. Please count the angle counterclockwise from the x axis. If there is not a fourth angle, please enter 0.";
std::cin >> A4;
std::cout << "Thank you. Now, please enter the unit of the force magnitudes.";
std::cin >> unit;
F1 * cos(A1) = F1x, F2 * cos(A2) = F2x, F3 * cos(A3) = F3x, F4 * cos(A4) = F4x;
F1 * sin(A1) = F1y, F2 * sin(A2) = F2y, F3 * sin(A3) = F3y, F4 * sin(A4) = F4y;
F1x + F2x + F3x + F4x = Rx;
F1y + F2y + F3y + F4y = Ry;
tan(Ry / Rx) = RA;
Rx * Rx + Ry * Ry = R ^ 2;
std::cout << "The Vector Resultant has magnitude " << R << " at an angle " << RA << " degrees from the x axis.";
}