Please note, this is a STATIC archive of website www.tutorialspoint.com from 11 May 2019, cach3.com does not collect or store any user information, there is no "phishing" involved.
#include <iostream>
using namespace std;
int main()
{
cout << "Hello World" << endl;
return 0;
}
#include <iostream>
// best version
int main()
{
std::cout << "Enter an integer: ";
int num{ 0 };
std::cin >> num;
std::cout << "Double that number is: " << num * 2 << '\n'; // use an expression to multiply num * 2 at the point where we are going to print it
return 0;
}
Advertisements
We use cookies to provide and improve our services. By using our site, you consent to our Cookies Policy.
AcceptLearn more