# Tra cứu code Python, C++ và Pascal ## Cấu trúc chương trình ### Python ```python= print("Hello world") ``` ### C++ ```cpp= #include <iostream> using namespace std; int main() { cout << "Hello World!" << endl; } ``` ### Pascal ```pascal= begin writeln ('Hello World!') end. ``` ## Khai báo và sử dụng biến ### Python ```python== n = 5 x = 2.0 s = "uCode.vn" print(n, x, s, sep='\n') ``` ### C++ ```cpp= #include <iostream> using namespace std; int main() { int n = 5; double x = 2.5; string s = "uCode.vn"; cout << n << endl << x << endl << s << endl; } ``` ### Pascal ```pascal= var n: integer = 5; x: double = 2.5; s: string = 'uCode.vn'; begin writeln(n); writeln(x); writeln(s); end. ```
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up