|
Dear Programmer's
I have a simple beam program, I would like
to know if anyone can tell me or has some code to import a .jpg or a .bmp file
into this window. Prehaps as a backgound image or just as a image above the
program.
I am using Borland's Turbo C++ for windows.
Can anyone offer some help? please.
Kimball,
#include <iostream.h> #include <math.h>
int main(void) { int w, L, I, a, b, c, e; double
long d, f, g;
cout << " *** SIMPLE BEAM PROGRAM
*** \n"; cout << "\n"; cout << "
________________________________\n"; cout << "
^
^\n"; cout << "
R1
R2\n"; cout << "\n"; cout << "Enter the
weight per foot on beam: \n"; cin >> w; cout
<< "\n"; cout << " Enter the lenght of beam:
\n"; cin >> L; cout << "\n"; cout
<< "Enter the Moment of Inertia: \n"; cin >>
I; cout << "\n";
a = 5 / 384;
b = w;
c = L*L*L*L;
d = 29000000 * I;
e = b * c;
g = e / d;
f = a * g;
cout.precision(4);
cout << " The DEFLECTION is " <<f<< " of a
inch";
return 0; }
|