Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- bai 1:
- #include <iostream>
- using namespace std;
- int main()
- {
- cout<<"Hello World";
- return 0
- bai 2:
- #include <iostream>
- using namespace std;
- int main()
- {
- int a,b,tong,tich,hieu;
- float thuong;
- cout<<"nhap a:";
- cin>> a;
- cout<<"nhap b:";
- cin>> b;
- cout<<"\ntong="<<a+b;
- cout<<"\nhieu="<<a-b;
- cout<<"\ntich="<<a*b;
- cout<<"\nthuong="<<(float)a/b;
- return 0;
- }
- bai 3:
- #include <iostream>
- using namespace std;
- int main()
- {
- float a;
- cout<<"nhap so a:";
- cin>> a;
- cout<<"phan nguyen cua so a="<<int(a);
- return 0;
- }
- bai 4:
- #include <iostream>
- using namespace std;
- int main()
- {
- char a;
- cout<<"Ki tu can chuyen qua ASCII la:";
- cin>> a;
- cout<<"Ma ASCII cua "<< a <<" la:"<<(int)a;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement