Author Topic: error with a function  (Read 2870 times)

sluft

  • Guest
error with a function
« on: November 21, 2010, 12:45:55 pm »
int main()
{
    float D,d, l, area, v;
    printf("Escriba el diámetro mayor:");
    scanf("%f",&D);
    printf("Escriba el diametro menor:");
    scanf("%f",&d);
    printf("Escriba la longitud:");
    scanf ("%f", &l);
    if (D<d)
    {
        printf("error");
    }
    else (D>d);
    {
    area = d/2 + 2/3(D/2 - d/2); //HERE IS THE ERROR, and it says "error '3' cannot be used as a function", please i need help//
    }
    v = Pi * l * area;
    printf("El volumen es %f", v);
    return 0;
}

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: error with a function
« Reply #1 on: November 21, 2010, 12:53:40 pm »
Your error is absolutely unrelated to C:B and therefore violating our forum rulse.

Learn the programming basics from a good book or tutorial.

Topic locked !