|
From: Jeffrey H. <jj...@er...> - 2003-05-25 20:44:33
|
Jeff Hall
----- Original Message -----
From: "Jeffrey Hall" <jj...@er...>
To: <dev...@li...>
Sent: Sunday, May 25, 2003 4:42 PM
Subject: saving output
Sorry..........
> Maybe you could help here.I'm running Dev-C++ 4.9.7.0
>
> In the enclosed program I can save only the out put that appears in the
DOS
> window.
> In short, I can't scroll back in the DOS window to mark (select) the
> beginning of a file that's more than circa 24 lines long and then save the
> file.
>
> There must be a way either to write the file to a Windows application (
via
> Printf?)
> or at least save the whole output file...................
> Jeff Hall
>
#define FIBC .0618034
#include <stdio.h>
#include <conio.h>
#pragma hdrstop
#pragma argsused
//--------------------------------------------------------------------------
-
#pragma argsused
float innumn, innumr;
float result,resulta,resultb,resultc;
float t;
float s;
main()
{
//1st bracket
printf( "Type a 1st number %f: ", innumn);
scanf("%f",&innumn);
printf( "Type a 2nd number larger than the 1st %f: ", innumr);
scanf("%f",&innumr);
{
//2nd bracket for preloop declarations
t = 45.0;
s = 0.;
for (s=1; (s <= (t - 1)); s++)
{
//3rd bracket for loop body
resulta = innumr-innumn;
//printf( "\n 2nd number - 1st number is %f: ", resulta);
resultb = resulta*FIBC;
//printf( "\n (2nd number - 1st number)* fibfact is %f: ", resultb);
resultc = resulta+resultb;
//printf( "\n (the diff between 2nd & 1st nums + fibfac of same is %f:
", resultc);
result = (innumr+resultc);
innumr = result - resulta;
printf ("\n Next Fibcurve coefficient of (innumr-innumn)*FIBC is £%f: ",
result);
}
//3rd bracket for loop body close
}
//2nd bracket for preloop declarations close
getch();
return 0;
}
//1st bracket close
|