Sunday, April 29, 2007

subaru taught me

He taught many thing, C++ GO etc.
#include
#include
#include //if you wan to use sin etc.

using namespace std; //you wan to use standard languige

void function(double xx);

int main(int argc, char *argv[])
{
double f, x;
int i;

printf("Enter the value of x: "); //printf equal to cout
scanf("%lf", &x); //scanf equal to cin
//"l" is needed

for (i = 1; i <>

{
function(x);
}

system("PAUSE");
return 0;
}

void function(double xx)
{
double ff;

ff = xx * xx;
printf("f is: %f\n", ff);

}