跳到正文

个人记录

函数

_me_约 1 分钟
原文
文章信息与版本

文章信息

收录
2025年12月12日
更新
2025年12月12日
篇幅
约 1 分钟

版本

  1. v2当前
  2. v1
C++
#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;
}
原文