c++ 2 dars

diyorbek077

Diyorbek

Posted on June 7, 2024

c++ 2 dars

operators
c++ operatorlar 6 hil boladi bular
(+) Qo'shish


#include <iostream>
using namespace std;
int main() {
  int x = 5;
  int y = 3;
  cout << x + y;
  return 0;
}
Enter fullscreen mode Exit fullscreen mode

(-) Ayirish

#include <iostream>
using namespace std;

int main() {
  int x = 5;
  int y = 3;
  cout << x - y;
  return 0;
}

Enter fullscreen mode Exit fullscreen mode

(*) Ko'paytirish

#include <iostream>
using namespace std;

int main() {
  int x = 5;
  int y = 3;
  cout << x * y;
  return 0;
}

Enter fullscreen mode Exit fullscreen mode

(/) Bo'lo'v

#include <iostream>
using namespace std;

int main() {
  int x = 12;
  int y = 3;
  cout << x / y;
  return 0;
}

Enter fullscreen mode Exit fullscreen mode

(%) foiz

#include <iostream>
using namespace std;

int main() {
  int x = 5;
  int y = 2;
  cout << x % y;
  return 0;
}

Enter fullscreen mode Exit fullscreen mode

(++) Qo'sish

#include <iostream>
using namespace std;

int main() {
  int x = 5;
  ++x;
  cout << x;
  return 0;
}

Enter fullscreen mode Exit fullscreen mode

(--) Kamaytirish

#include <iostream>
using namespace std;

int main() {
  int x = 5;
  --x;
  cout << x;
  return 0;
}

Enter fullscreen mode Exit fullscreen mode
💖 💪 🙅 🚩
diyorbek077
Diyorbek

Posted on June 7, 2024

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

Sign up to receive the latest update from our blog.

Related

What was your win this week?
weeklyretro What was your win this week?

November 29, 2024

Where GitOps Meets ClickOps
devops Where GitOps Meets ClickOps

November 29, 2024

How to Use KitOps with MLflow
beginners How to Use KitOps with MLflow

November 29, 2024

Modern C++ for LeetCode 🧑‍💻🚀
leetcode Modern C++ for LeetCode 🧑‍💻🚀

November 29, 2024