A variable of type double named area holds the area of a circle. Write a statement to
output on the screen the area in two decimal places

Recommended Answers

printf will allow you to format output as you'd like.

double area = ...;
printf ("Area: %0.2f\n", area);
Jump to Post

All 2 Replies

printf will allow you to format output as you'd like.

double area = ...;
printf ("Area: %0.2f\n", area);
commented: Great! +0

So doris, to you remember what the equation is to compute the area of a circle? You want us to do your homework for you? Give us a break! It is tiring to keep getting requests to solve simple homework assignments. READ THE FARKING BOOK!

Sorry, but it has been a long day. I had to install and configure major application servers on two Windows server systems today (remotely) and I am tired... The servers were in Bermuda, but unfortunately I was not able to arrange a site visit, sigh.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.20 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.