标签:main c语言 clu mic names for turn string length
#include<iostream> #include<cmath> using namespace std; int main() { float x, y; string s = "I love you!"; int l = s.length(); for (y = 1.3f; y >= -1.1f; y -= 0.06f) { int t = 0; for (x = -1.1f; x <= 1.1f; x += 0.025f) { double heart = x * x + (5.0 * y / 4.0 - sqrt(abs(x))) * (5.0 * y / 4.0 - sqrt(abs(x))); if (heart <= 1) { cout << s[t]; t = (t + 1) % l; } else cout << " "; } cout << endl; } return 0; }
标签:main c语言 clu mic names for turn string length
原文地址:https://www.cnblogs.com/HGNET/p/12461505.html