Wednesday, June 24, 2009

Variables can be initialised by a calculation involving other variables



NOTE : -
THIS CONTENT IS NOT ORIGINAL

5. Variables can be initialised by a calculation involving other variables

A variable can be initialised by a calculation involving other variables:


using namespace std;
#include

int main ()
{
double a = 12 * 3.25;
double b = a + 1.112;

cout << "a contains: " << a << endl;
cout << "b contains: " << b << endl;

a = a * 2 + b;

double c = a + b * a;

cout << "c contains: " << c << endl;

return 0;
}


Output
a contains: 39
b contains: 40.112
c contains: 4855.82



BIBILOGRAPHY / REFERENCE : - http://www.4p8.com/eric.brasseur/cppcen.html

No comments:

3G S

JAIL BREAK

iPHONE

BILL GATES

StEvE JoBs

steve jobs

STEVE JOBS

Steve Jobs

Love Country

SD

Burroughs

Lift

Joseph Johnson

Apple Rainbow

Apple Blue

Apple Laser Printer