top1编程
← 返回题目
题解

【入门】零花钱问题

1 条题解

  • 0
    @ 2026-7-29 0:16:03
    #include <bits/stdc++.h>
    using namespace std;
    double x;
    int main(){
    	cin >> x;
    	cout << x << endl;
    	cout << x+8 << endl;
    	cout << x+6 << endl; 
    	cout << fixed <<setprecision(1)   << (3*x+14)/3;
    	return 0;
    }
    
    • 1