C++


Channel's geo and language: not specified, not specified
Category: not specified


💠 Assalom alaykum 👋
💻 C++ tillida ishlagan misollarimni boʼlishib boraman 😄
Kodlarda xato topsangiz manga yozing
@abdurahim_saloxitdinov🧑‍💻

Related channels

Channel's geo and language
not specified, not specified
Category
not specified
Statistics
Posts filter


#massiv #kopolchamli
#include
#include
#include
using namespace std;
int main(){
srand(time(0));
int n, max;
cout > n;
float B[n][n];
for (int i = 0; i < n; i++){
for (int j = 0; j < n; j++){
B[i][j] = rand() % 100;
cout


#massiv #massivgashartbilanyozish
#include
using namespace std;
int main(){
int n = 5, k = 7, m = 0;
int X[n] = {2, 4, 1, 7, 5}, Y[k] = {8, 7, 4, 9, 3, 11, 14}, Z[n + k];
for (int i = 0; i < n; i++){
Z[m] = X[i];
m++;
}
for (int i = 0; i < k; i++){
Z[m] = Y[i];
m++;
}
int max = Z[0], max_index;
for (int i = 0; i < m; i++){
if(Z[i] > max){
max = Z[i];
max_index = i;
}
}
cout


#massiv #massivgashartbilanyozish #teskari
#include
using namespace std;
int main(){
float X[] = {5.4, 2.3, -4.6, 7.8, -3.4, 25.6};
int n = 6, m = 0;
float Y[6];
for (int i = n - 1; i >= 0; i--){
Y[m] = X[i];
cout


savol taxlili:
4-qatorda cout


#list #royhat #node
Ro‘yhat yarating, Ro‘yhatga N ta haqiqiy son kiriting.Ro‘yhatning barcha elementlari yig’indisini ro‘yhat boshiga qo’shish dasturini yarating.
kod:
#include
using namespace std;
class Node{
public:
float number;
Node *next;
};
struct node{
int number;
struct node *next;
};
void push(struct Node **head, int node_data){
struct Node *newNode = new Node;
newNode->number = node_data;
newNode->next = (*head);
(*head) = newNode;
}
int main(){
Node *head = NULL;
Node *lastPtr = NULL;
int action, n, sum;
int numb;
cout > n;
cout numb;
if (numb % 2)
sum += numb;
ptr->number = numb;
ptr->next = NULL;
if (head == 0)
{
head = ptr;
lastPtr = ptr;
}
lastPtr->next = ptr;
lastPtr = ptr;
}
cout


#while #sum #loop
#include
using namespace std;
int main(){
int b = -4, ha = 2;
float x = 3, a = 2, y, hx = 0.5;;
while (1){
y = (b * x * x) / (a - 1);
cout


👆👆👆 Kodda qanday natija chiqadi?
Poll
  •   Salom dunyo
  •   Error
  •   Qandaydir son
  •   Endi bilib olaman
64 votes




#massiv #min #funksiya
#include
#include
using namespace std;
void minElem(int mass[], int n){
int min = mass[0];
for (int i = 0; i < n; i++){
if(mass[i] < min)
min = mass[i];
}
cout


#sonningraqamlarikopaytmasi #funksiya #raqam #son #kopaytmasi
#include
#include
using namespace std;
void RaqamKopaytmasi(int son){
int sum = 1;
while (son){
sum *= son % 10;
son = son /10;
}
cout


#swap #qiymatlarnialmashtirish #funksiya
#include
#include
using namespace std;
void Swap(float &a, float &b){
a = a + b;
b = a - b;
a = a - b;
}
int main(){
float A, B;
cout > A;
cout > B;
Swap(A, B);
cout


#fuksiya #yuza #koordinata #perimetr #s #p
#include
#include
using namespace std;
void RectPS(float x1, float y1, float x2, float y2, float &S, float &P){
float a, b;
a = fabs(x1 - x2);
b = fabs(y1 - y2);
S = a * b;
P = 2 * (a + b);
}
int main(){
float x1, y1, x2, y2, S, p;
cout > x1;
cout > y1;
cout > x2;
cout > y2;
RectPS(x1, y1, x2, y2, S, p);
cout


#uchburchak #yuza #perimetr #s #p #funksiya
#include
#include
using namespace std;
void TrianglePS(float a, float &S, float &P){
S = (sqrt(3) / 4) * pow(a, 2);
P = 3 * a;
}
int main(){
float a1, a2, a3, S, p;
cout > a1;
TrianglePS(a1, S, p);
cout


Dev C++, Visual studio, Codeblock, ....
Poll
  •   C++ dasturi
  •   Kodlarni ishga tushiradigan
  •   Kod yozish uchun muhit (Kompelyatorlar)
  •   Endi bilib olaman
15 votes


#massiv #massivgashartbilanyozish #max #min
#include
using namespace std;
int main(){
int a[] = {1, 2, 3, 12, 8, 13, 17, 4, 5, 4, 9};
int n = 11, max = a[0], min = a[0], j = 0, b[11];
for (int i = 0; i < n; i++){
if(a[i] > max)
max = a[i];
if(a[i] < min)
min = a[i];
}
for(int i = 0; i < n; i++){
if(a[i] != max && a[i] != min){
b[j] = a[i];
cout


#massiv #massivgashartbilanyozish #formula
#include
#include
using namespace std;
int main(){
float a[ ] = {5.75, -6, 3.4, -2.5, 3, 6}, b[ ] = {-3.4, -0.5, 8.45, 4.3, 5.6};
int n = 5;
float c[5];
for (int i = 0; i < n; i++){
c[i] = (a[i] + b[i]) / (pow(a[i], 2) * sqrt(b[i]));
cout


#massiv #massivgashartbilanyozish #formula
#include
#include
using namespace std;
int main(){
float a[] = {2.5, 4.3, -1, 2.75, 3.55, 10, 48, 11, 9.8, 12, 10.5, 15, 6, 18};
int n = 14;
float b[14];
for (int i = 0; i < n; i++){
b[i] = exp(a[i] - i);
cout


#massiv #min #findmin
#include
using namespace std;
int main(){
int a[] = {1, 2, 3, 12, 8, 13, 17, 4, 5, 4, 9};
int n = 11, min = a[0];
for (int i = 0; i < n; i++){
if(a[i] < min)
min = a[i];
}
cout


#massiv #findmax #max
#include
using namespace std;
int main(){
int a[] = {1, 2, 3, 12, 8, 13, 17, 4, 5, 4, 9};
int n = 11, max = a[0];
for (int i = 0; i < n; i++){
if(a[i] > max)
max = a[i];
}
cout


#tub #funksiya #a_b_oraliq
#include
#include
using namespace std;
bool tub(int i){
int a = 2, sanoq = 0;
while(a a){
for(int i = a; i

20 last posts shown.

51

subscribers
Channel statistics