28-11-2008, 15:34
|
|
|
|
חבר מתאריך: 03.03.02
הודעות: 581
|
|
ה יי אשמח להסבר
ניסתי לכתוב אבל אני לא חושב שזה עונה על התנאים
#include <stdio.h>
#include <stdlib.h>
void main ()
{
float x,y,z,max1,max2;
printf("enter 3 number ");
scanf ("%f %f %f" ,&x,&y,&z);
if (x>y)
max1=x;
if (max1>z)
printf ("error"); //the big number is max1
else
if (y>max1)
max2=y;
max1=max2;
else if ((max2>z)) //match between 2 biggest number
max2=z;
printf("3rd place is %f" ,max2);
else
printf("the 2îd place number is =%f" ,z);
}
נערך לאחרונה ע"י public בתאריך 28-11-2008 בשעה 15:42.
סיבה: תקון הגייה
|