DEV Community

Sanjar Rashidov
Sanjar Rashidov

Posted on

if()

Syntax of if:
if(condition)
{
statement
}

Agar "if"ga bergan shartimiz tog'ri bo'lsa "if"ga kiradi va berilgan ishni bajaradi, agar noto'gri bo'lsa "if"ga kirmaydi.

#include <iostream>

using namespace std;

int main()
{
    int n = 7;

    if(n == 7)
    {
        cout << n << endl;
    }

    return 0;
}
Enter fullscreen mode Exit fullscreen mode

Top comments (0)