=====================================================
/* Slip1_1 : Accept 2 nos and print Arithmatic and Harmonic mean */
=====================================================
#include

main()
{
    int n1,n2,ans;
    printf("\n Enter 2 nos ");
    scanf("%d%d",&n1,&n2);

    ans=(n1+n2)/2;
    printf("\n Arithematic Mean = %d ",ans);

    ans=(2*(n1*n2))/(n1+n2);
    printf("\n Harmonic Mean = %d ",ans);
}

No comments:

Post a Comment

Note: only a member of this blog may post a comment.