Variable
source link: https://aungkoman.github.io/howto/2024/03/26/variables.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Variable
Variable ဆိုတာ စွန်လား သေတ္တာလား?
ကွန်ပျူတာ ပရိုဂရမ်းမင်းကို လေ့လာတဲ့အခါ ပထမဆုံး သင်ရတဲ့ concept က variable ပါ။
int age = 30;
များသောအားဖြင့်တော့ Variable ကို သေတ္တာလိုမျိုး မြင်လို့ရတယ်။
ဒီအပေါ်က ကုတ်ကို စိတ်ထဲမှာ ဘာသာပြန်မယ်ဆိုရင်
သေတ္တာတစ်လုံးရှိတယ်။ သေတ္တာရဲ့ Label က age သေတ္တာထဲမှာ သိမ်းထားတဲ့ Value က 30
int age = 30;
print(age); // output -> 30
သေတ္တာထဲမှာ သိမ်းထားတာကို ထုတ်ကြည့်ရင် 30 ကို မြင်ရမယ့်ပေါ့။
int age = 30;
print(age); // output -> 30
age++; // သေတ္တာထဲက တန်ဖိုးကို တစ်တိုး
print(age); // output -> 31
int age2 = age; // ပထမသေတ္တာထဲက တန်ဖိုးကို ဒုတိယ သေတ္တာထဲထည့်။
print(age2); // output -> 31;
age2--; // သေတ္တာထဲက တန်ဖိုးကို တစ်လျော့
print(age2); // output -> 30
print(age); // output -> 31
ဒီလောက်အထိက သေတ္တာ Concept နဲ့ အဆင်ပြေတယ်။ နောက်တစ်ပိုင်းမှာတော့ သေတ္တာလို့ တွေးလို့မရပဲ စွန်လို့ တွေးမှ နားလည်မယ့် ကုတ်တွေ အကြောင်း ဆက်လက်တင်ပြပါဉီးမယ်။
ကွန်ပျူတာ မှာလည်း လူတွေလိုပဲ ဘာသာစကားမျိုးစုံရှိတယ်။
Python Java Script C++
စသည်ဖြင့် ဘာသာစကားပေါင်း (၉,၀၀၀) လောက်ရှိတယ်။
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK