Question about ArcMedia JavaScript Source Code 3000 Pro (gar448) for PC

Function to calculate factorial would be:

function fact(n){

if (n<=1) return 1;

return fact(n-1);

}

or nonrecursive

function factnr(n)

var f=1;

for(i=n;i>1;i--) f=f*i;

return f;

}

In both cases n must be an integer

Posted on Feb 03, 2009

Why do you program in c or visual basic

if you can do the job with a database software access for example

and if you want your problem to be solved you must provide more info

if you can do the job with a database software access for example

and if you want your problem to be solved you must provide more info

Apr 15, 2014 | Microsoft Visual Basic 6.0 for PC

First create a program or send the program in my mail arulpandit@gmail.com and i solve it...

Jan 06, 2011 | Sun Java Programming Language (cdj-275)

refer fulldl4all@blogspot.com to solve this.

Aug 21, 2009 | Compilers & Programming Tools

perform a hard reset to your mobile phone. doing this will wipe the phone to factory status when it was placed in the box. this will wipe out all personal data, music, messages, files, numbers.

cheers.

cheers.

Aug 15, 2009 | ArcMedia JavaScript Source Code 3000 Pro...

If it's an int type it's already integer without exponential for examle:

void main()

{

int num=5;

num/=2;

clrscr();

printf("%d",num);

}

so the out put is 2 and no 2.5 or:

for(int i=0; i<num; i++)

so 'i' is the integer part of num.

Rate me please, thanks.

void main()

{

int num=5;

num/=2;

clrscr();

printf("%d",num);

}

so the out put is 2 and no 2.5 or:

for(int i=0; i<num; i++)

so 'i' is the integer part of num.

Rate me please, thanks.

Jul 11, 2009 | Microsoft Compilers & Programming Tools

Runtime Error in VB6 2147467259, How to solve this err

Jul 11, 2009 | Microsoft Visual Basic Enterprise Edition...

find the real root of the equation xe-1-0 correct four decimal places

Jun 01, 2009 | ACI Compilers & Programming Tools

TRY DOWNLOADING NEW DRIVERS

May 15, 2009 | HP Compilers & Programming Tools

Sydney to solve your problem i need more information ok,
so what is the make and model of your PC and what operating system are you using ? what is the make and model of the printer.

May 07, 2008 | Compilers & Programming Tools

An array is a series of elements of the same type placed in contiguous memory locations that can be individually referenced by adding an index to a unique identifier

Initializing arrays. When declaring a regular array of local scope (within a function, for example), if we do not specify otherwise, its elements will not be initialized to any value by default, so their content will be undetermined until we store some value in them. The elements of global and static arrays, on the other hand, are automatically initialized with their default values, which for all fundamental types this means they are filled with zeros

include <iostream>

using namespace std;

int billy [] = {16, 2, 77, 40, 12071};

int n, result=0;

int main ()

{

for ( n=0 ; n<5 ; n++ )

{

result += billy[n];

}

cout << result;

return 0;

}

multidimensional array pseudo-multidimensional array #define WIDTH 5 #define HEIGHT 3 int jimmy [HEIGHT][WIDTH]; int n,m; int main () { for (n=0;n<HEIGHT;n++) for (m=0;m<WIDTH;m++) { jimmy[n][m]=(n+1)*(m+1); } return 0; } #define WIDTH 5 #define HEIGHT 3 int jimmy [HEIGHT * WIDTH]; int n,m; int main () { for (n=0;n<HEIGHT;n++) for (m=0;m<WIDTH;m++) { jimmy[n*WIDTH+m]=(n+1)*(m+1); } return 0; }

and now for trignometry

#include<iostream>

#include<cmath>

using namespace std;

int main()

{

int factorial(int);

int n = 3, i = 1;

double x, x2, b, PI, r;

char choice;

//r = x * (PI / 180)

cout<<"Please enter an angle value => ";

cin>>x;

cout<<"Is the angle value in Degree or Radian?"<<endl;

cout<<"Type D if its in degree "<<endl;

cout<<"Type R if its in radian "<<endl;

cin>>choice;

if((choice = 'R')||(choice = 'r'))

do{

i++; n = 3; x2 = 0; b = x2;

{

if(i == 1)

x2 = x - (pow(x,n) /factorial(n));

n = n + 2;

};

else

{

x2 = (x2 + ((pow(x,n)) /(factorial(n))) - (pow(x,n+2)) / (factorial(n+2)));

n = n + 4;

}

}while(abs(b - x2) > 0.000001);

else

//convert it to r

r = x * PI /180;

//cout<<"error occured/n";

cout<<"sin(x) = "<<x2<<endl;

return 0;

}

Initializing arrays. When declaring a regular array of local scope (within a function, for example), if we do not specify otherwise, its elements will not be initialized to any value by default, so their content will be undetermined until we store some value in them. The elements of global and static arrays, on the other hand, are automatically initialized with their default values, which for all fundamental types this means they are filled with zeros

include <iostream>

using namespace std;

int billy [] = {16, 2, 77, 40, 12071};

int n, result=0;

int main ()

{

for ( n=0 ; n<5 ; n++ )

{

result += billy[n];

}

cout << result;

return 0;

}

multidimensional array pseudo-multidimensional array #define WIDTH 5 #define HEIGHT 3 int jimmy [HEIGHT][WIDTH]; int n,m; int main () { for (n=0;n<HEIGHT;n++) for (m=0;m<WIDTH;m++) { jimmy[n][m]=(n+1)*(m+1); } return 0; } #define WIDTH 5 #define HEIGHT 3 int jimmy [HEIGHT * WIDTH]; int n,m; int main () { for (n=0;n<HEIGHT;n++) for (m=0;m<WIDTH;m++) { jimmy[n*WIDTH+m]=(n+1)*(m+1); } return 0; }

and now for trignometry

#include<iostream>

#include<cmath>

using namespace std;

int main()

{

int factorial(int);

int n = 3, i = 1;

double x, x2, b, PI, r;

char choice;

//r = x * (PI / 180)

cout<<"Please enter an angle value => ";

cin>>x;

cout<<"Is the angle value in Degree or Radian?"<<endl;

cout<<"Type D if its in degree "<<endl;

cout<<"Type R if its in radian "<<endl;

cin>>choice;

if((choice = 'R')||(choice = 'r'))

do{

i++; n = 3; x2 = 0; b = x2;

{

if(i == 1)

x2 = x - (pow(x,n) /factorial(n));

n = n + 2;

};

else

{

x2 = (x2 + ((pow(x,n)) /(factorial(n))) - (pow(x,n+2)) / (factorial(n+2)));

n = n + 4;

}

}while(abs(b - x2) > 0.000001);

else

//convert it to r

r = x * PI /180;

//cout<<"error occured/n";

cout<<"sin(x) = "<<x2<<endl;

return 0;

}

Mar 24, 2008 | ArcMedia JavaScript Source Code 3000 Pro...

Oct 07, 2014 | ArcMedia JavaScript Source Code 3000 Pro...

104 people viewed this question

Usually answered in minutes!

×