answersLogoWhite

0

cin and cout are synonymous with stdin and stdout, implementing console input and output respectively.

User Avatar

Wiki User

12y ago

What else can I help you with?

Related Questions

Why cin and cout are not consider as keywords?

cin and cout are iostream objects, not keywords.


1 Write a C plus plus program to read two integers and display them Use cin and cout statements?

#include <iostream> using namespace std; int main() { int x,y; cout<<"please, enter the 1st value : "; cin>>x; cout<<"please, enter the 2nd value : "; cin>>y; cout<<endl; cout<<"the first value is : "<<x<<endl; cout<<"the second value is : "<<y<<endl; return 0; }


How do you make a calculator using switch statement?

In C++: #include <iostream> using namespace std; int main() { int x, y; char func; cout << "Enter a number: "; cin >> x; cout << "Choose Function: "; cin >> func; cout << "Enter another number: "; cin >> y; switch(func) { case '+': cout << x + y << endl; break; case '-': cout << x - y << endl; break; case '*': cout << x * y << endl; break; case '/': cout << x / y << endl; break; default: cout << "Invalid Function!" << endl; break; } char wait; cin >> wait; return 0; }


Can cin and cout be used in the function definition of user defined functions in C plus plus?

The cin and cout entities (they are not statements) are C++ iostream library objects that allows access to "standard input" and "standard output". In C++, the statement cout > variable; allows reading from standard input to a variable.


What is Cin and Cout?

The cin and cout objects are iostream objects somewhat equivalent to stdin and stdout. The equivalent of printf ("Hello World\n"); is cout << "Hello World" << endl; The equivalent of scanf ("%d", &i); is cin >> i;


How you can use two input in a single statement in c plus plus?

cout<<"______": cin >>__>>__; [example cout<<"enter no."; cin>>a>>b; ]


Program in c plus plus that accepts 10 input integer and to get the Greatest common divisor?

#include<iostream> using namespace std; int gcf(int a, int b) { int t; while(b!=0) { t = b; b = a%b; a = t; } return a; } int main() { int a,b,c,d,e,f,g,h,i,j,k; cout<<"Enter 1st numbers: "; cin>>a; cout<<"Enter 2nd numbers: "; cin>>b; cout<<"Enter 3rd numbers: "; cin>>c; cout<<"Enter 4th numbers: "; cin>>d; cout<<"Enter 5th numbers: "; cin>>e; cout<<"Enter 6th numbers: "; cin>>f; cout<<"Enter 7th numbers: "; cin>>g; cout<<"Enter 8th numbers: "; cin>>h; cout<<"Enter 9th numbers: "; cin>>i; cout<<"Enter 10th numbers: "; cin>>j; k=gcf((((((((gcf(a,b),c),d),e),f),g),h),i),j); cout<<"The GCD of the 10 numbers is: "<<k<<endl; system("pause"); return 0; }


How do you write a program in C plus plus to find volumn of a cuboid?

#include<iostream.h> void main() { int l,b,h,v; cout<<"Enter length "; cin>>l; cout<<"Enter breadth "; cin>>b; cout<<"Enter Height "; cin>>h; v=l*b*h; cout<<"Volume is "<<v; }


Why Cin and Cout cannot be used outside the main function?

You are completely wrong here.Another answer:There is nothing to say you cannot use cin or coutoutside the main() function (for example, you can use them in a function called from main()). However, using them before main() has been called (e.g. in the constructor of a static object) can have disastrous consequences: cin and cout are themselves static objects, and static initialisation order is undefined. Thus you could be calling them before they have been properly constructed.


Develop a mark sheet in C plus plus for the university examination by using any form of constructors?

#include<iostream.h> class student { char name[10]; int rollno; public: void get() { cout<<"enter student's name"<<endl; cin>>name; cout<<"enter student's rollno"<<endl; cin>>rollno; } void disp() { cout<<"Name of the student is : "<<name<<endl; cout<<"Rollno is : "<<rollno<<endl; } }; class marks:public student { char subjectname[15]; int subcode,intmarks,extmarks; public: void get() { student::get(); cout<<"enter subject name"; cin>>subjectname; cout<<"enter subject code"; cin>>subcode; cout<<"enter Internal marks"; cin>>intmarks; cout<<"enter External marks"; cin>>extmarks; } void disp() { student::disp(); cout<<"Subject name is : "<<subjectname<<endl; cout<<"Subject code is : "<<subcode<<endl; cout<<"Internal marks : "<<intmarks<<endl; cout<<"External marks : "<<extmarks<<endl; } }; void main() { marks m; m.get(); m.disp(); }


How do you make a input and output basic statement in C plus plus?

The most basic input/output operations can be performed with std::cin for input and std::cout for output. For example: #include<iostream> int main (void) { int n; std::cout << "Enter a number: "; std::cin >> n; std::cout << "The value " << n << " was entered!\n"; }


Marksheet of 5 student using c pro?

#include #include #include class student { int roll; char name[25]; char add [25]; char *city; public: student() { coutname; cout>sub3; } void output() { putdata(); cout