DEV Community

kenccik
kenccik

Posted on

Konstanta CONST

Konstanda bu ozgarmas ozgaruvhci degani biz bu ozgaruvchin yaratganimizda biz uni ozgar tirolamaymiz.
*Man bu ni hozir kodda tushuntirib beraman.
*


#include <iostream>
using namespace std;
​
int main() {
    const int n = 20;  // n ning qiymati doim 20 ga teng bo'ladi 

    return 0;
}
Enter fullscreen mode Exit fullscreen mode

Bu kodda esa man hato sini korsatib beraman

#include <iostream>
using namespace std;
​
int main() {
    const int n = 13;  
int n = 20;
    return 0;
}
Enter fullscreen mode Exit fullscreen mode

Top comments (0)