rendered paste body//abc-formule( eerste programma)#include <iostream>#include <math.h>using namespace std;int main (){ //declareren van variabelen float a, a2, b, b2, b3, b4, c, D, sqrD, x, x1; //invoeren van variabelen cout << "Voer variabele a in." << endl; cin >> a; cout << "Je hebt het getal: " << a << " ingevoerd" << endl; cout << "Voer variabele b in." << endl; cin >> b; cout << "Je hebt het getal: " << b << " ingevoerd" << endl; cout << "Voer variabele c in." << endl; cin >> c; cout << "Je hebt het getal: " << c << " ingevoerd" << endl; //berekenen van overige variabelen a2 = 2*a; b2 = b*b; b3 = b-b2; D = b2-4*a*c; sqrD = sqrt (D); //berekenen van eindantwoord x x = (b3-sqrD)/a2; x1 = (b3+sqrD)/a2; cout << "D = " << D << endl; if (D < 0) cout << "x heeft geen oplossingen." << endl; else if (D > 0) cout << "x = " << x << " of x = " << x1 << endl; else cout << "x = " << x << endl; return 0;}