Woensdag 17 April 2013

Pretest 1

1. Menghitung volume bola.

Flowchart :


C++:

#include <cstdlib>
#include <iostream>

using namespace std;
void bola (){
int r,volume;
cout<<"masukkan nilai jari-jari :";
cin>>r;
cout<<"volume bola :"<<4/3*3.14*r*r*r<<endl;

}
int main(int argc, char *argv[])
{
    bola();


    system("pause");
    return 0;
}

Geen opmerkings nie:

Plaas 'n opmerking