c++ reading string
#include <iostream>
#include <string>
string str;
getline(cin, str);
//str contains line
c++ reading string
#include <iostream>
#include <string>
string str;
getline(cin, str);
//str contains line
c++ cin operator
//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;
}
read from stdin c
#include <stdio.h>
int main( ) {
char str[100];
int i;
printf( "Enter a value :");
scanf("%s %d", str, &i);
printf( "nYou entered: %s %d ", str, i);
return 0;
}
get data from terminal c++
int i;
cout << "Please enter an integer value: ";
cin >> i;
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us