I keep getting an error "error: expected expression before ':' token" in the line marked below and I don't know what is wrong. Neither does my TA haha.

#include <stdio.h>

#define PI: 3.1416 //sets constant pi

int main (void)

{

//Local Declarations

float radius;

float volume;

float length;

float number;

float total_volume;

//Statements

//makes user input hotdog data

printf("\nEnter the length of the hot dog: ");

scanf("%f",&length);

printf("\nEnter the radius of the hot dog: ");

scanf("%f",&radius);

printf("\nEnter the number of hot dogs: ");

scanf("%f",&number);

// prints the required values

printf("\nHot dog length: %10.2f ", length);

printf("\nHot dog radius: %10.2f ", radius);

volume = ( PI * radius * radius * length ) + ( ( 4 / 3 ) * PI * radius * radius * radius ); //ERROR

printf("\nVolume(cc) of one hotdog is: %10.2f", volume);

total_volume = volume * number;

printf("\nTotal volume(cc) of hotdogs is: %10.2f", total_volume);

return (0);

Advertisement