#13136: d579 解題報告


stanleyyu (DYU18 D85)

School : 臺北市私立延平高級中學
ID : 69083
IP address : [203.72.178.252]
Last Login :
2018-12-21 17:14:07
d579. 兩條線 -- raincole | From: [114.24.64.234] | Post Date : 2017-12-17 12:24

#include <iostream>
#include <iomanip>
using namespace std ;
int main () {
	double n ;
	while (cin >> n) {
		if (n>0) {
			cout << "|" << fixed << setprecision(4) << n << "|=" << fixed << setprecision(4) << n << endl ; 
		}
		else {
			cout << "|" << fixed << setprecision(4) << n << "|=" << fixed << setprecision(4) << -n << endl ; 
		}
	}
}
 
ZeroJudge Forum