C++

cout & cin (iostream)

Në shqip: cout dhe cin

ShpjegimiSQ

cout dhe cin janë mënyra si një program C++ flet me përdoruesin: cout << shfaq tekst në ekran, ndërsa cin >> lexon atë që shkruan përdoruesi. Të dyja vijnë nga libraria <iostream>.

EnglishEN

cout and cin are how a C++ program talks to the user: cout << shows text on screen, while cin >> reads what the user types. Both come from the <iostream> library.

Si ta mendosh

Si sporteli i postës: cout është sporteli ku të japin letra, cin është kutia ku i fut letrat e tua.

Lexoje në anglisht

Like a post office counter: cout is where letters are handed to you, cin is the box where you drop yours in.

Shembull kodicpp

int mosha;
std::cout << "Sa vjeç je? ";
std::cin >> mosha;
std::cout << "Pas 10 vitesh: " << mosha + 10 << "\n";

Terma të lidhur