Answers for "c++ set cout"

C++
1

how to use cout function in c++

#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 "\n" or new line
	
  	return 0; //just exiting the program
}
Posted by: Guest on November-12-2021
-1

Cout C++

#include <iostream>

using namespace std;

int main()
{

	cout << "[Enter Text Here]" << endl;
    
    return 0;
}
Posted by: Guest on March-12-2022

Browse Popular Code Answers by Language