Calculate inside cout statement - C++ Language Basics

C++ examples for Language Basics:Console

Description

Calculate inside cout statement

Demo Code

#include <iostream>
using namespace std;
int main()/*from  w w  w.  ja  v a  2s  . c o  m*/
{
   cout << "30.0 times 0.05 is " << 30.0 * 0.05 << endl;
   return 0;
}

Result


Related Tutorials