#include <iostream>
using namespace std;
int main() {
float num = 3.14159;
cout << fixed;
cout.precision(2);
cout << num << endl;
printf("%.1f", num); //apenas se for usar em C puro, não use em C++
}
//https://pt.stackoverflow.com/q/94564/101
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKaW50IG1haW4oKSB7CiAgICBmbG9hdCBudW0gPSAzLjE0MTU5OwogICAgY291dCA8PCBmaXhlZDsKICAgIGNvdXQucHJlY2lzaW9uKDIpOwogICAgY291dCA8PCBudW0gPDwgZW5kbDsKICAgIHByaW50ZigiJS4xZiIsIG51bSk7IC8vYXBlbmFzIHNlIGZvciB1c2FyIGVtIEMgcHVybywgbsOjbyB1c2UgZW0gQysrCn0KCi8vaHR0cHM6Ly9wdC5zdGFja292ZXJmbG93LmNvbS9xLzk0NTY0LzEwMQ==