Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Câu 4:
- #include <iostream>
- using namespace std;
- int main()
- {
- char mh ;
- cout<<"Ki tu chuyen sang ASCII la:";
- cin>> mh;
- mh=(int)mh;
- cout<<"Ma ASCII cua"<< mh <<"la:"<<(int)mh;
- return 0;
- }
- Câu 3:
- #include <iostream>
- using namespace std;
- int main()
- {
- float a;
- cout<<"nhap so a:";
- cin>> a;
- a=int(a);
- cout<<"phan nguyen cua so a="<<a;
- return 0;
- }
- Câu 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<<"tong="<<a+b<<endl;
- cout<<"hieu="<<a-b<<endl;
- cout<<"tich="<<a*b<<endl;
- cout<<"thuong="<<(float)a/b<<endl;
- return 0;
- }
- Câu 1:
- #include <iostream>
- using namespace std;
- int main()
- {
- cout<<"Hello World";
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement