Click here to Skip to main content
15,919,358 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: JPEG to Cur Conversion Pin
ForNow16-May-10 7:10
ForNow16-May-10 7:10 
GeneralRe: JPEG to Cur Conversion Pin
Code-o-mat16-May-10 8:38
Code-o-mat16-May-10 8:38 
GeneralRe: JPEG to Cur Conversion Pin
ForNow16-May-10 8:51
ForNow16-May-10 8:51 
GeneralRe: JPEG to Cur Conversion Pin
Code-o-mat16-May-10 11:47
Code-o-mat16-May-10 11:47 
GeneralRe: JPEG to Cur Conversion --- Awicons did the trick Pin
ForNow16-May-10 8:35
ForNow16-May-10 8:35 
QuestionSolved - Two-Dimensional Array not reading right [modified] Pin
Frank Robertson15-May-10 16:20
Frank Robertson15-May-10 16:20 
AnswerRe: Two-Dimensional Array not reading right Pin
Luc Pattyn15-May-10 17:36
sitebuilderLuc Pattyn15-May-10 17:36 
GeneralRe: Two-Dimensional Array not reading right Pin
Frank Robertson15-May-10 19:30
Frank Robertson15-May-10 19:30 
GeneralRe: Two-Dimensional Array not reading right Pin
Luc Pattyn16-May-10 1:07
sitebuilderLuc Pattyn16-May-10 1:07 
GeneralRe: Two-Dimensional Array not reading right Pin
Frank Robertson17-May-10 13:00
Frank Robertson17-May-10 13:00 
GeneralCongrats Pin
Luc Pattyn17-May-10 13:11
sitebuilderLuc Pattyn17-May-10 13:11 
GeneralRe: Two-Dimensional Array not reading right Pin
Iain Clarke, Warrior Programmer16-May-10 20:49
Iain Clarke, Warrior Programmer16-May-10 20:49 
AnswerRe: Two-Dimensional Array not reading right Pin
Aescleal15-May-10 22:42
Aescleal15-May-10 22:42 
GeneralRe: Two-Dimensional Array not reading right Pin
Frank Robertson16-May-10 0:51
Frank Robertson16-May-10 0:51 
QuestionLinux commands Pin
TTPadmin15-May-10 12:07
TTPadmin15-May-10 12:07 
AnswerRe: Linux commands Pin
markkuk15-May-10 12:17
markkuk15-May-10 12:17 
GeneralRe: Linux commands Pin
TTPadmin15-May-10 12:29
TTPadmin15-May-10 12:29 
GeneralRe: Linux commands Pin
CPallini15-May-10 12:39
mveCPallini15-May-10 12:39 
AnswerRe: Linux commands Pin
Paul M Watt15-May-10 20:24
mentorPaul M Watt15-May-10 20:24 
GeneralRe: Linux commands Pin
TTPadmin17-May-10 12:12
TTPadmin17-May-10 12:12 
GeneralRe: Linux commands Pin
TTPadmin19-May-10 12:19
TTPadmin19-May-10 12:19 
QuestionInteracting with a 3rd party application dialog window Pin
Still learning how to code15-May-10 11:55
Still learning how to code15-May-10 11:55 
AnswerRe: Interacting with a 3rd party application dialog window Pin
Paul M Watt15-May-10 20:37
mentorPaul M Watt15-May-10 20:37 
GeneralRe: Interacting with a 3rd party application dialog window - ANSWERED ! Pin
Still learning how to code15-May-10 21:28
Still learning how to code15-May-10 21:28 
Questionfunction doesn't reply Pin
hasani200715-May-10 9:51
hasani200715-May-10 9:51 
Hello all;
I write a simple program to calculate quadratic equation with function in c.
/*purpose: calculate the roots of a quadratic equation supposing b^2>4*a*c */<br />
#include <stdio.h><br />
#include <math.h><br />
float solver(float a,float b, float c){<br />
    float delta,x1,x2;<br />
    delta=(b*b)-4*a*c;<br />
    x1=(-b+sqrt(delta))/2*a;<br />
    x2=(-b-sqrt(delta))/2*a;<br />
    return(x1,x2);<br />
}<br />
void main(){<br />
    float a,b,c,d; <br />
    printf("a = ");<br />
    scanf("%f", &a);<br />
    printf("b = ");<br />
    scanf("%f", &b);<br />
    printf("c = ");<br />
    scanf("%f", &c);<br />
    printf("%f\n%f",solver(a,b,c));<br />
<br />
}


the result for a=1,b=2,a=1 is
-1.00000
0.00000

and for any other numbers the second result is 0.00000
Where is the problem.

Thanks anyone help me.

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.