$21.08 is an example of a currency Number format in Excel
<u>Explanation:</u>
For items like currency, one can format numbers in cells in Excel.
To view all possible number formats, click the Dialog Box Launcher attached to Number on the Home tab in the Number group.
In the Format Cells dialog box, in the Category list, click Currency or Accounting.
In the Symbol box, tick the currency symbol.
In the Decimal places box, insert the number of decimal places.
Employed for common financial values and presents the default currency figure with quantities.
Ctrl+Shift+$ is a shortcut to represent currency values.
This is an easy answer sure in the back of your mind u knew it was b good luck :).
Answer:
#include <iostream>
#include <iomanip>
using namespace std;
int main()
{
double caffeineMg;
cin>>caffeineMg;
cout<<"After 6 hours: "<<fixed<<setprecision(2)<<caffeineMg/2.0<<" mg\n";
cout<<"After 12 hours: "<<fixed<<setprecision(2)<<caffeineMg/4.0<<" mg\n";
cout<<"After 24 hours: "<<fixed<<setprecision(2)<<caffeineMg/8.0<<" mg\n";
return 0;
}
Explanation:
- Declare a variable for caffeine and take the input from user.
- Print the results by dividing the caffeine by relevant Half Life.
- Use setprecision function to display the result up to 2 decimal places.