#include <iostream>
using std::cout;
int main()
{
cout<<"Hello world";
return 0;
}
#include <iostream>
using namespace std;
int main()
{
cout << "[Enter Text Here]" << endl;
return 0;
}
#include <iostream> //the library that contains cout
//cout is located in the "std" namespace so you can just say
//"using namespace std" to directly have access to cout or you can just
//type std::cout and it well work the same
int main()
{
std::cout << "text" << std::endl; //endl is basicly the same as printing "
" or new line
return 0; //just exiting the program
}
int age;
cout << "How old are you ?" << endl;
cin >> age;
#include <iostream>
using namespace std;
int main(){
cout<<"hello world!"<<endl;
return 0;
}
std::cout << "Hello World!" << std::endl; //Or you can do
std::cout << "Hello World!" <<; //Only in some scenarios
The cout object in C++ is an object of class ostream.
cout << "Your text";
//or
cout << "Your text" << endl;
//or
int x = 5;
cout << "x = " << x << endl;
//or
cout << "x = " << x;
Code Example |
---|
Cpp :: c++ max and min of vector |
Cpp :: operator overload |
Cpp :: print number with leading zeros |
Cpp :: c++ if else if |
Cpp :: type casting in cpp |
Cpp :: middle node of linked list |
Cpp :: default access specifier in c++ |
Cpp :: how to create a structure c++ |
Cpp :: inpout in Array c++ |
Cpp :: void pointer c++ |
Cpp :: C++ Counting |
Cpp :: function overloading in cpp |
Cpp :: C++ mutex header |
Cpp :: how to make a c++ iostream program restart when finished |
C :: how to slow voice speed in pyttsx3 |
C :: how to get time and date in c |
C :: wireless app debug android |
C :: imprimir valor no octave |
C :: grep find and replace |
C :: how to convert string to integer in c |
C :: how to declare a integer list on c |
C :: dynamically create matrix c |
C :: concatenate char * c |
C :: how to print value of pointer in c |
C :: list c |
C :: c modify char array |
C :: c to llvm |
C :: putchar in c |
C :: c programming language |
C :: c loop |