News:

As usual while waiting for the next release - don't forget to check the nightly builds in the forum.

Main Menu

error with a function

Started by sluft, November 21, 2010, 12:45:55 PM

Previous topic - Next topic

sluft

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;
}

Jenna

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 !