函数

· · 个人记录

#include <bits/stdc++.h>
#define ll long long
using namespace std;
const double P = 3.14159, E = 2.71828;
int main() {
    ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
    for(double x = -20; x <= 20; x += 0.1){
        double y = sin(x); //改这里 
        for(double i = -5; i <= 5; i += 0.1){
            if(abs(i - y) < 0.3) cout << "##";
            else if(abs(x) < 0.1 || abs(i) < 0.1) cout << "OO";
            else cout << "  ";
        }cout << '\n';
    }
    return 0;
}