HORATIO CHENG
Wednesday, February 3, 2010
simple win 32 console apps
#include
main ()
{
float y1, y2, avgy;
float avg(float, float);
y1 = 5.0;
y2 = 7.0;
avgy = avg(y1, y2);
cout << "\n The Average = "<< avgy;
return 0;
}
float avg(float x1, float x2)
{
float avgx;
avgx = (x1 + x2)/2;
return avgx;
}
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment