Biz bugun C++
darsida ishlashni organdik.Replit.com
esa qanday foydalanishni bilib oldik unda kamentlarni kodlashni organib oldik.
/*cout << "Salom guruhdegilar\n";
cout << "salom nima "<<end ;
cout << "salom nima ";*/
Replit.comdan C++dan foydalanish
#include <iostream>
biz foydalanmoqchi bolgan kutubxonamiza.
using namespace std;
bundan esa hadib std::
cout
ishlatmaslig ucun foydalandik.
RUN
dan esa qanday qilib ekranga ciqarib olishnin bilib oldik.
Biz c++dan
yana kop narsalarni o'rgandik.
C++dan
O'zgaruvchilar turlarni organdik
adata tip nom=qiymat;
-------------Ozgaruvchilar turlari---------------
int=>integer ya'ni faqat butun son saqlaydi;4byte
string=>faqat tekstlar saqlash ucun;4byte
char=>faqat 1ta belgi saqlash ucun;1byte
float=>faqat kasr son saqlash ucun;4byte
*/
int yosh =17;
string ism =" Charos";
cout<<" Salom"<<ism<<endl;
cout<<"men"<<yosh<<" daman";
return 0;
}
cpp
*C++ * kopaytirish,qoshishni,ayirishni organdik
int main4(){
int son,son1,son2;
son1=10;
son2=son1+20;
son=son1+son2;
cout<< son << endl; //40
son=son*3;
cout<< son<<endl;
string ism,a,b,c;
ism=" Charos";
a="Salom";
b=" Nima gap";
cout <<a<<ism<<b<<endl;
b="Qalaysan";
cout<<b;
return 0;
`int main6(){
int son;
cin >>son;
cout<< son<<"*"<<1<<"="<<son*1<<endl;
cout<< son<<"*"<<2<<"="<<son*2<<endl;
cout<<son<<"*"<<3<<"="<<son*3<<endl;
cout<<son<<"*"<<4<<"="<<son*4<<endl;
cout<<son<<"*"<<5<<"="<<son*5<<endl;
cout<<son<<"*"<<6<<"="<<son*6<<endl;
cout<<son<<"*"<<7<<"="<<son*7<<endl;
cout<<son<<"*"<<8<<"="<<son*8<<endl;
cout<<son<<"*"<<9<<"="<<`
BU ko'paytirish
Top comments (0)