Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <iomanip> // manipulation (libreria di manipolazione)
- using namespace std;
- int main() {
- double x=1.7356 , y=2.337, z= 2.0, a=2.0;
- cout << setiosflags(ios::showpoint) << setprecision(3);
- cout<< (x*y) << endl;
- cout << endl << a*z;
- cout << endl << setprecision(0)<< a*z;
- cout << int(a*z) << endl; //Usando il CASTING abbiamo il risultato che ci aspettavamo
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement