abror07

Abror_7

Posted on December 21, 2022

C++

C++
ko'dalarni o'z ichiga oladi

replit yordamida ko'dlarni yozamiz
Masalan;

#include <iostream>
#include <iomanip>
using namespace std;
int main() {
int eni, boyi;
  cout << "Area is ";
  cin >> eni >> boyi;
  cout << setprecision(2) << fixed << eni * boyi << (".") ;
return 0;
}
Enter fullscreen mode Exit fullscreen mode

#include <iostream> bu kutubxona .
bu kutubxonada bizga kerakli bo'lgan buyrular mavjud.
Masalan;

std

std shu ko'rinishda ishlatilinadi

 std :: cout << "salom do'stlar";
Enter fullscreen mode Exit fullscreen mode

std buyrug'ini ishlatmasa ham buyruq bersa bo'ladi uning nomi
using namespace std ;

#include <iostream>
using namespace std;

int main() {

 cout << "Hala Madrid";

  return 0;

}
Enter fullscreen mode Exit fullscreen mode

int main (){}shu ko'rinishda bo'ladi.
int main- main so'zi "Asosiy funksiya" degani hamma ko'dlarni buni ichiga yozamiz


int main() {

 cout << 4-5 ;

Enter fullscreen mode Exit fullscreen mode

replit da hamma so'lar qo'shtirnoq ichida yoziladi.

#include <iostream>
using namespace std;

int main() {

 cout << "bugun og'ir kun bo'ldi";

  return 0;

}
Enter fullscreen mode Exit fullscreen mode

data tip nom - qiymat ya'ni o'zgaruvchilarning turlari
uning ichiga
int ya'ni faqat butun son saqlaydi


int a = 45 ;
 cout << 50 - a ;

  return 0;

}
Enter fullscreen mode Exit fullscreen mode

string faqat textlar uchun .

#include <iostream>
using namespace std;

int main() {


string a = "Abror" ;
 cout << "Salom " << a ;

  return 0;

}
Enter fullscreen mode Exit fullscreen mode

char faqat bitta belgi saqlash uchun .
float faqat kasr sonlar uchun.

@dawroun

💖 💪 🙅 🚩
abror07
Abror_7

Posted on December 21, 2022

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

Sign up to receive the latest update from our blog.

Related

Комментарий C++
undefined Комментарий C++

October 31, 2024

Stack vs Heap memory
java Stack vs Heap memory

July 27, 2024

Who am I?
programming Who am I?

September 6, 2024