xxxxxxxxxx
#include <iostream>
using namespace std;
int main() {
string nameEntered;
cout << "Enter your name: \n";
cin >> nameEntered;
cout << "So, your name is " << nameEntered;
return 0;
}
xxxxxxxxxx
//Akbarali saqlagan C++ bo'yicha cin operatoriga ta'rif
#include <iostream>
using namespace std;
int main (){
int a;
cout << "Kattaroq sonni yozing: ";
cin >> a;
int b;
cout << "Tepadaginga nisbatan kichik bo`lgan son(qiymatni) yozing: ";
cin >> b;
cout << "Birinchi kiritgan soningizdan ikkinchi kiitgan soningiz " << a-b << " marta katta ekanligi ma'lum bo'ldi.\n";
return 0;
}
xxxxxxxxxx
cin >> variable;
// sample 1
int x;
cout << "x: ";
cin >> x;
cout << x << endl;
//sample 2
int num;
for (int i = 0; i < 10; i++){
cout << "Give a number: ";
cin >> num;
}