Click here to Skip to main content
15,897,371 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: binary sort function? Pin
DaveE9th8-Jul-03 7:58
DaveE9th8-Jul-03 7:58 
GeneralVC++ hangs... Pin
Rage7-Jul-03 22:56
professionalRage7-Jul-03 22:56 
GeneralRe: VC++ hangs... Pin
Toni788-Jul-03 15:20
Toni788-Jul-03 15:20 
Question%1f\n? Pin
DaveE9th7-Jul-03 22:55
DaveE9th7-Jul-03 22:55 
AnswerRe: %1f\n? Pin
Rage7-Jul-03 22:59
professionalRage7-Jul-03 22:59 
AnswerRe: %1f\n? Pin
Cedric Moonen7-Jul-03 23:05
Cedric Moonen7-Jul-03 23:05 
AnswerRe: %1f\n? Pin
Rage7-Jul-03 23:05
professionalRage7-Jul-03 23:05 
GeneralRe: %1f\n? Pin
DaveE9th7-Jul-03 23:55
DaveE9th7-Jul-03 23:55 
I'm still confused on the line below...

printf ("sqrt(%lf) = %lf\n\n", x, result );

Where does the %lf get the square root value from to display? I see that x is passed as an argument into the sqrt function, but where does the return(the square root) output?

Thanks

--------------------------------------------------------
#include <stdio.h>
#include <math.h>
#include <iostream.h>

int main ()
{
double x, result;
cout<<"please enter any number";
cin>>x;
result = sqrt (x);
printf ("sqrt(%lf) = %lf\n\n", x, result );
return 0;
}
GeneralRe: %1f\n? Pin
Rage8-Jul-03 0:39
professionalRage8-Jul-03 0:39 
GeneralRe: %1f\n? Pin
Ryan Binns8-Jul-03 0:50
Ryan Binns8-Jul-03 0:50 
GeneralRe: %1f\n? Pin
Rage8-Jul-03 1:08
professionalRage8-Jul-03 1:08 
GeneralRe: %1f\n? Pin
Ryan Binns8-Jul-03 1:11
Ryan Binns8-Jul-03 1:11 
GeneralRe: %1f\n? Pin
Rage8-Jul-03 1:12
professionalRage8-Jul-03 1:12 
GeneralRe: %1f\n? Pin
Ryan Binns8-Jul-03 1:14
Ryan Binns8-Jul-03 1:14 
GeneralRe: %1f\n? Pin
Cedric Moonen8-Jul-03 0:50
Cedric Moonen8-Jul-03 0:50 
GeneralRe: %1f\n? Pin
Rage8-Jul-03 1:11
professionalRage8-Jul-03 1:11 
GeneralRe: %1f\n? Pin
Cedric Moonen8-Jul-03 1:18
Cedric Moonen8-Jul-03 1:18 
GeneralRe: %1f\n? Pin
Steve S8-Jul-03 2:30
Steve S8-Jul-03 2:30 
GeneralRe: %1f\n? Pin
DaveE9th8-Jul-03 9:08
DaveE9th8-Jul-03 9:08 
GeneralOpen Website with &quot;POST&quot; Pin
AnTri7-Jul-03 22:27
AnTri7-Jul-03 22:27 
GeneralRe: Open Website with &quot;POST&quot; Pin
Iain Clarke, Warrior Programmer8-Jul-03 0:03
Iain Clarke, Warrior Programmer8-Jul-03 0:03 
GeneralRestore down button Pin
imajit7-Jul-03 22:09
imajit7-Jul-03 22:09 
GeneralRe: Restore down button Pin
Iain Clarke, Warrior Programmer7-Jul-03 23:58
Iain Clarke, Warrior Programmer7-Jul-03 23:58 
GeneralRe: Restore down button Pin
imajit8-Jul-03 1:06
imajit8-Jul-03 1:06 
GeneralRe: Restore down button Pin
Iain Clarke, Warrior Programmer8-Jul-03 1:42
Iain Clarke, Warrior Programmer8-Jul-03 1:42 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.