This preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: "Enter value of voltage increment for start: " ; cin >> incvoltage; // voltage incriment pspeed = 3.0 + (2.1 * pow(pvoltage,2))/1.3 + (0.3 * (pow(pvoltage,2))); cvoltage = pvoltage + incvoltage; cspeed = 3.0 + (2.1 * pow(cvoltage,2))/1.3 + (0.3 * pow(cvoltage,2)); do { d = ((cvoltage  pvoltage) / (cspeed  pspeed)); nexvoltage = cvoltage + 0.1 * (d * (dspeedcspeed)); nexspeed = 3.0 + (2.1 * pow(nexvoltage,2)) / 1.3 + (0.3 * pow(nexvoltage,2)); cout << endl << "Next Voltage: " << nexvoltage << endl << "Desired Speed: " << dspeed << endl << "Next Speed: " << nexspeed; cin >> dummy; /* V1 = V2; T2 = T3; V2 = V3; T2 = T3; */ pvoltage = cvoltage; pspeed = cspeed; cvoltage = nexvoltage; cspeed = nexspeed; Error = ((abs(cspeed  dspeed) / dspeed)) * 100; } while (Error>=accuracy); cout << endl << "Congrats " ; return 0; }...
View
Full Document
 Spring '09
 Dr.Doe
 Carriage return, endl, lex Fidalgo, loop. char dummy

Click to edit the document details