[ create a new paste ] login | about

Link: http://codepad.org/eTBYUL1J    [ raw code | output | fork ]

C++, pasted on Mar 23:
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;
}


Output:
1
2
3
cc1plus: warnings being treated as errors
In function 'int main()':
Line 10: warning: converting to 'int' from 'double'


Create a new paste based on this one


Comments: