#include <stdioh>
#include <mathh>
#include <stdlibh>
#define I 20
#define R 340
#include <stringh>
int main()
{
char answer[10];
printf("遇到你\n我才发现\n曾经所有的条件\n似乎都成了我等你的借口\n\n");
printf("我对你的感情已经决堤\n所以\n请允许我,从今往后映入你\n明媚的眼\n");
printf("我\n想和你\n耳鬓厮磨,相濡以沫!");
printf("答应我吧!\n输入yes,你可以看到我的真心\n");
scanf("%s", answer);
float y, x, z, f;
for (y = 15f; y > -15f; y -= 01f)
{
for (x = -15f; x < 15f; x += 005f)
{
z = x x + y y - 1;
f = z zz - x xyyy;
putchar(f <= 00f ""[(int)(f-80f)] : ' ');
}
putchar('\n');
}
long time;
for (;;)
{
system("color a");
for (time = 0; time<99999999; time++);
system("color b");
for (time = 0; time<99999999; time++);
system("color c");
for (time = 0; time<99999999; time++);
system("color d");
for (time = 0; time<99999999; time++);
system("color e");
for (time = 0; time<99999999; time++);
system("color f");
for (time = 0; time<99999999; time++);
system("color 0");
for (time = 0; time<99999999; time++);
system("color 1");
for (time = 0; time<99999999; time++);
system("color 2");
for (time = 0; time<99999999; time++);
system("color 3");
for (time = 0; time<99999999; time++);
system("color 4");
for (time = 0; time<99999999; time++);
system("color 5");
for (time = 0; time<99999999; time++);
system("color 6");
for (time = 0; time<99999999; time++);
system("color 7");
for (time = 0; time<99999999; time++);
system("color 8");
for (time = 0; time<99999999; time++);
system("color 9");
}
getchar();
return 0;
}
运行效果:
扩展资料:
printf函数使用注意事项
1、域宽
%d:按整型数据的实际长度输出。
如果想输出指定宽度可以指定域宽,%md--&gt;m域宽,打印出来以后,在控制台上,显示m位;
如果我们要打印的数的位数如果超过我们设定m则原样输出;
如果我们要打印的数的位数如果小于我们设定的位数,则补空白,具体如下:
如果m为正数,则左对齐(左侧补空白);
如果m为负数,则右对齐(右侧补空白)。
2、转义字符
如果想输出字符"%",则应该在“格式控制”字符串中用连续两个%表示。
如:printf("%f%%",1.0/3);输出结果:0.333333%。
Option Explicit
Private Sub Command1_Click()
Cls
Dim a() As Integer
GetNewData a
Dim s As Variant
For Each s In a
Print s '输出结果
Next
End Sub
Function GetNewData(ByRef a() As Integer)
ReDim a(0)
Dim temp As Integer, s As Variant, exists As Boolean, sum As Integer
Do While UBound(a) < 3
DoEvents
Randomize
temp = Int(Rnd 20) + 1
exists = False
For Each s In a
If s = temp Then exists = True
Next
If Not exists Then
a(UBound(a)) = temp
ReDim Preserve a(UBound(a) + 1)
End If
sum = 0
If UBound(a) = 3 Then
For Each s In a
sum = sum + s
Next
If sum <= 10 Or sum >= 18 Then ReDim a(0)
end if
Loop
ReDim Preserve a(UBound(a) - 1)
End Function
Dim LX As Long
Dim LY As Long
Dim MD As Boolean
Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
MePSet (X, Y)
LX = X
LY = Y
MD = True
End Sub
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
If MD = True Then
MeLine (LX, LY)-(X, Y)
LX = X
LY = Y
End If
End Sub
Private Sub Form_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
MD = False
End Sub
以上就是关于求一个用于表白的C语言或C++的程序,谢谢大家了全部的内容,包括:求一个用于表白的C语言或C++的程序,谢谢大家了、求高手用VB语言写个小程序,谢谢、请教VB高手帮编一个小程序等相关内容解答,如果想了解更多相关内容,可以关注我们,你们的支持是我们更新的动力!
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)