C++ (cin va <iomanip> kutubxonasi)

kenccik

kenccik

Posted on March 9, 2023

C++ (cin va <iomanip> kutubxonasi)

C++ da cin buyuruq bu qib olishdakedey boladi masalan

#include <iostream>
using namespace std;
int main() {
int a = 10;
cin >> a;
return 0;
Enter fullscreen mode Exit fullscreen mode

shunaday qilib cin yordamida biz ozgaruvchini oqib olishimiz mumkin.
Endi kutubxonasiga otsak bu kutubxonada biz
setpresivion() setfill() va setw() buyuqlaridan foydalanaolamiz.
Xosh setprecosion () bu biz berilgan ozgaruvchigacha bolgan sonni chiqaraolamiz.
Setw() bu space tashash biz ozgaruvchi yaratib olsak va tagidan cout << setw() <<A;
deb qilsan "A" ozgaruvchidagi harf yoki soni bitta joy tashaydi.
Setfill () bu setw() dan tashagan joyni orniga son belgi, yoki harf qoyolamiz.

πŸ’– πŸ’ͺ πŸ™… 🚩
kenccik
kenccik

Posted on March 9, 2023

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related

Veriables in C++
beginners Veriables in C++

March 4, 2024

DAY 104 - Merge k Sorted Lists
beginners DAY 104 - Merge k Sorted Lists

September 15, 2023

DILI #6
beginners DILI #6

July 7, 2023

Did I learn it? #3
beginners Did I learn it? #3

June 16, 2023

Did I learn it? #2
beginners Did I learn it? #2

June 9, 2023