❶ 用idea怎么制作爱心符号
idea爱心符号代码需要用start命令打
1,windowsxp用start命令运行,输入start,可以获得该命令的使好银用帮助。
2,在windows XP的命令提示符中输入:start、seperate要运行的程序,即可运行相应的DOS程序,这就是idea爱心晌游代码友谨宴打法。
❷ c语言的爱心代码
爱心代码慧磨编程:
#include <stdio.h>
int main(void)
{
float a,x,y;
for(y=1.5f; y>-1.5f; y-=0.1f)
{
for(x=-1.5f; x<1.5f; x+=0.05f)
{
a = x*x+y*y-1;
char ch = a*a*a-x*x*y*y*y<=0.0f?'*':' ';
putchar(ch);
}
printf(" ");
}
return 0;
}
书写规则
1、一个说明或一个语句占一行。
2、用{} 括起来的部分,通常表示了程序的某一层次结构。{}一般与该结构语句的第一个字母对齐,并单独占一前败斗行。
3、低一层次的语句或说明可比高一层次的语句或说明缩进若干格后书写。以便看起来更加清枯卖晰,增加程序的可读性。在编程时应力求遵循这些规则,以养成良好的编程风格。
❸ 用VB程序怎么做一个心型图
Dim X1, Y1, X2, Y2 As Integerx0dx0aDim I As Integerx0dx0aDim J As Booleanx0dx0aDim K As IntegerDim WithEvents Label1 As Labelx0dx0aDim WithEvents Timer1 As TimerPrivate Sub Form_Activate()x0dx0a I = 100x0dx0a K = 100x0dx0a X1 = Me.Width / 2x0dx0a Y1 = Me.Height / 3x0dx0a X2 = X1x0dx0a Y2 = Y1x0dx0aLabel1.Top = Me.Height / 2 - Label1.Height / 2x0dx0a Label1.Left = Me.Width / 2 - Label1.Width / 2x0dx0aEnd SubPrivate Sub Form_Load() Me.BackColor = &H0&x0dx0a Me.FillColor = RGB(Rnd * 255, Rnd * 255, Rnd * 255)x0dx0a Me.ForeColor = RGB(Rnd * 255, Rnd * 255, Rnd * 255)x0dx0a Me.DrawMode = 13x0dx0a Me.DrawWidth = 2x0dx0a Me.FillStyle = 7x0dx0aSet Label1 = Me.Controls.Add("VB.Label", "Label1")x0dx0a Set Timer1 = Me.Controls.Add("VB.Timer", "Timer1")x0dx0aLabel1.Visible = Truex0dx0a Label1.AutoSize = Truex0dx0a Label1.BackStyle = 0x0dx0a Label1.Caption = "I LOVE YOU"x0dx0a Label1.Font.Size = 60x0dx0a Label1.ForeColor = &HFF00&x0dx0a Timer1.Enabled = Truex0dx0a Timer1.Interval = 10x0dx0a Me.WindowState = 2x0dx0aEnd SubPrivate Sub Timer1_Timer()x0dx0a Me.Circle (X1, Y1), 250x0dx0a Me.Circle (X2, Y2), 250x0dx0a x0dx0a If Y1 <= Me.Height - 1200 Thenx0dx0a X1 = X1 + Kx0dx0a Y1 = Y1 - Ix0dx0a X2 = X2 - Kx0dx0a Y2 = Y2 - Ix0dx0a I = I - 2x0dx0a If Y1 <= Me.Height / 3 Thenx0dx0a K = K - 1x0dx0a ElseIf Y1 >= Me.Height / 3 Thenx0dx0a K = K - 5x0dx0a End Ifx0dx0a Elsex0dx0a I = 100x0dx0a K = 100x0dx0a X1 = Me.Width / 2x0dx0a Y1 = Me.Height / 3x0dx0a X2 = X1x0dx0a Y2 = Y1x0dx0a x0dx0a Me.FillColor = RGB(Rnd * 255, Rnd * 255, Rnd * 255)x0dx0a Me.ForeColor = RGB(Rnd * 255, Rnd * 255, Rnd * 255) End Ifx0dx0a x0dx0a Me.DrawWidth = 3x0dx0a x0dx0a Me.PSet (Rnd * Me.Width, Rnd * Me.Height), RGB(Rnd * 225, Rnd * 225, Rnd * 225)x0dx0a Me.DrawWidth = 2x0dx0aEnd SubPrivate Sub Form_Click()x0dx0a Endx0dx0aEnd SubPrivate Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)x0dx0a Endx0dx0aEnd Sub