hy guys can you please tell me what s wrong with the folowing code

float a,b,c;
    printf("input three numbers:\n");
    scanf ("%f%f%f",&a,&b,&c);
    float z=sqrt((1/2)*(pow(a,2.0)+pow(b,2.0)+pow(c,2.0))-(3/4)*pow(a,2.0));
    printf("res is %f",z);
    getch();
    return 0;

(1/2) gives the int zero.
(3/4) gives the int zero.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.