Hello
i am a newbie here and just started to study c.
Is the source below correct?
I know the maximum number is 4,294,967,295.
but if i input random numbers sometimes it gives me wrong number.
How can i rewrite it better??
Thank you
Code:
#include<stdio.h>
int main()
{
unsigned int length, width, averagedepth, volume;
printf("Enter the length of the swimming pool: ");
scanf("%d", &length);
printf("Enter the width of the swimming pool: ");
scanf("%d", &width);
printf("Enter the average depth of the swimming pool: ");
scanf("%d", &averagedepth);
volume = length * width * averagedepth;
printf("The volume of the pool is ");
printf("%d",volume);
return 0;
}