trouble with my first c program
Hi, this is my first post on these forums, I searched through the faq and couldnt find an answer so I am asking here. Im not even sure if its possible, but I am trying to make it so that my program won't round the result when its printed to only two decimal places on the screen. Thanks in advance for any help. :D
Code:
/* Programmer: Michael Blazar
Objective:To find out the cost of wallpapering a spherical room with a diameter of 6084 and the cost of the wallpaper input by the user */
#include <stdio.h>
#define PI 3.14159265
int main(void)
{
float cost;
int DIAMETER = 6084;
printf("What is the cost of wallpaper per square meter in dollars?\n");
scanf("%f", &cost);
printf("The spherical room costs $%.2f to wallpaper.", DIAMETER * cost * PI);
return 0;
}