Tuesday, January 18, 2011

ILMU...

  1. #include
    #include
    void smallest(int,int,int);
    void largest(int,int,int);
    int main()
    {
    int a,b,c;
    double sum,average,product;
    printf("enter first number\n");
    scanf("%d",&a);
    printf("enter second number\n");
    scanf("%d",&b);
    printf("enter third number\n");
    scanf("%d",&c);
    smallest(a,b,c);
    largest(a,b,c);
    sum=a+b+c;
    printf("sum=%0.2lf\n",sum);
    product=a*b*c;
    printf("product=%0.2lf\n",product);
    average=(a+b+c)/3;
    printf("average=%0.2lf\n",average);
    system("PAUSE");
    }
    void smallest(int a,int b,int c)
    {
    if (avalue="%d\n\n" value="%d\n\n"
    value="%d\n\n">b&&a>c)
    printf("largest value=%d\n\n",a);
    else if (b>a&&b>c)
    printf("largest value=%d\n\n",b);
    else if (c>b&&c>a)
    printf("largest value=%d\n\n",c);
    }
www.tips-fb.com

2 comments:

muben said...

bgus..

Anonymous said...

nde gok mu ery..