0
how i can print in c++
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.
+ 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/
+ 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;
+ 1
std::cout<<“text\n”;