0

how i can print in c++

30th Aug 2019, 2:33 PM
ابوبكر محمد
ابوبكر محمد - avatar
4 Réponses
+ 15
You can use the cout output function from the iostream header file. ► First simply add the header file. #include <iostream> using namespace std; ► And then in the main function, use cout to print whatever you want int main() { cout << "Text you want to output"; } But if you want to print comments then it's not possible to print comments.
30th Aug 2019, 2:46 PM
Nova
Nova - avatar
+ 6
Hello, 😊 Can you specifying your question correctly. • SEARCH for similar QUESTIONS or ANSWERS before posting • Include relevant TAGS Please, **Remember and Follow our Community Guidelines — https://www.sololearn.com/Content-Creation-Guidelines/ https://www.sololearn.com/learn/CPlusPlus/1604/
30th Aug 2019, 3:35 PM
Danijel Ivanović
Danijel Ivanović - avatar
+ 3
cout is used to print in c++ if u want to read the values keyboard we use cin Ex: cout<<"sandhya"; Output: sandhya ex2: int a,b; cout<<"enter a,b values "; cin>>a>>b; a=a+b; cout<<" sum of two numbers="<<a;
30th Aug 2019, 2:43 PM
👀 Sandy👀
👀  Sandy👀 - avatar
+ 1
std::cout<<“text\n”;
30th Aug 2019, 10:11 PM
Kireii
Kireii - avatar