Bekijk de onderstaande video om te zien hoe je onze site als een web app op je startscherm installeert.
Opmerking: Deze functie is mogelijk niet beschikbaar in sommige browsers.
[SIZE="2"][COLOR="SeaGreen"]#include <iostream>
#include <math> [/COLOR] [COLOR="Blue"]//Vergeet niet de header-file Math toe te voegen[/COLOR]
[B]using namespace[/B] std;
int main()
{
[B]double[/B] x = [COLOR="navy"]9[/COLOR]; [COLOR="Blue"]//Declaratie/initialisate van x met waarde 9[/COLOR]
[B]double[/B] uitkomst; [COLOR="Blue"]//Uitkomst is ook een double[/COLOR]
uitkomst = sqrt(x); [COLOR="Blue"]//Berkent de wortel van 9[/COLOR]
cout << uitkomst; [COLOR="Blue"]//en dat is inderdaad 3[/COLOR]
cin.get(); [COLOR="Blue"]//Wacht op een ENTER[/COLOR]
[B]return[/B] [COLOR="Navy"]0[/COLOR];
}[/SIZE]
[SIZE="2"][COLOR="SeaGreen"]#include <iostream>
#include <math> [/COLOR] [COLOR="Blue"] //Vergeet niet de header-file Math toe te voegen[/COLOR]
[B]using namespace [/B]std;
int main()
{
[B]double[/B] x = [COLOR="navy"]2[/COLOR]; [COLOR="blue"]//Declaratie/initialisatie van x met waarde 2[/COLOR]
[B]double[/B] y = [COLOR="navy"]8[/COLOR]; [COLOR="blue"]//Declaratie/initialisatie van y met waarde 8[/COLOR]
[B]double[/B] uitkomst; [COLOR="blue"]//Uitkomst is ook een double[/COLOR]
uitkomst = pow(x, y); [COLOR="blue"]//Berkent x tot de macht y[/COLOR]
cout << uitkomst; [COLOR="blue"]//en dat is inderdaad 256[/COLOR]
cin.get(); [COLOR="blue"]//Wacht op een ENTER[/COLOR]
[B]return[/B] [COLOR="Navy"]0[/COLOR];
}[/SIZE]
We gebruiken essentiële cookies om deze site te laten werken, en optionele cookies om de ervaring te verbeteren.