1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
#include <iostream> #include <iomanip> using namespace std; int main() { double x; cout << "Nhap x: "; cin >> x; int a= x; cout << a << endl; return 0; }
1 2 3
cc1plus: warnings being treated as errors In function 'int main()': Line 10: warning: converting to 'int' from 'double'