Ⅰ 在c语言里,怎么做“我爱你”的一个程序呢
#include<stdio.h>
#include<stdlib.h>
intmain(void)
{
puts("我爱你");
returnEXIT_SUCCESS;
}
(1)c语言示爱程序扩展阅读
C++的表达方式
usingnamespaceSystem;
voidmain()
{
Console::WriteLine("我爱你");
}
Ⅱ 求C语言编写的表白程序,要代码
呃,你还不如用vbs,网上也有一堆教程和例子,很简单,随便看一下就知道怎么写了。
DimmyName,herName,myNameAns,herNameAns
myName="池早早"
herName="欧浩辰"
MsgBox(herName+",我喜欢你!我的脑和心,我全身上下每一个器官都在说着我喜欢你。")
do
herNameAns=InputBox("我喜欢谁?","某人的名字")
loopwhileherNameAns<>herName
do
myNameAns=InputBox("谁喜欢"+herName+"?","某人的名字")
loopwhilemyNameAns<>myName
do
myNameAns=InputBox("大声点我听不见!","你的名字")
loopwhilemyNameAns<>myName
MsgBox(herName+",这是我为你准备的药,你趁热吃吧!")
.........................保存为xxx.vbs文件就能运行了
Ⅲ 求一个示爱的小程序 C语言
void a(int aa)
{for(int i=0;i<aa;i++)printf(" ");}
void b()
{printf ("*");}
char c(int cc)
{printf("%c",cc);return 0;}
int main()
{a(6);b();a(3);b();a(5);b();a(3);b();
printf (" ");
a(4);b();a(8);b();a(8);b();
printf (" ");
a(3);b();a(19);b();
printf (" ");
a(3);b();a(4);c(73);a(1);c(76);c(111);c(118);
c(101);a(1);c(89);c(111);c(117);a(5);b();
printf (" ");
a(4);b();a(17);b();
printf (" ");
a(6);b();a(13);b();
printf (" ");
a(8);b();a(9);b();
printf (" ");
a(10);b();a(5);b();
printf (" ");
a(13);b();
printf (" ");return 0;
}
效果如下:
Ⅳ 程序员的表白代码
程序员的表白代码
第一条语言:Java代码翻译:直到死之前,每天爱你多一点代码:while(lifeend){love++;}
第二条语言:C语言代码翻译:.代码:#incldestdio.hintmain(){printf(HelloWorldn);retrn0;}//.
第三条语言:python代码翻译:山无陵,江水为竭,冬雷震震,夏雨雪,天地合,乃敢与君绝!代码:if(mountain.arris==None):if(river.water==None):if(winter.thunder==True):if(summer.snow==True):if(sky.height==ground.height):i.withyou=Falseelse:i.withyou=True.
第四条语言:Erlang代码代码翻译:深圳相遇,至死不渝代码:-mole(you_and_me).-export([start/1]).-record(person,{name,address,status}).start(Name)-one_world(Name).one_world(Name)keep_to_love_you(Person).say_goodbye(Person)-io:format(~p:seeyounextworld!~n,[Person#person.name]).see_you_next_world(Name)-one_world(Name).
第五条语言:Java语言代码翻译:爱你到天荒地老代码:while(!world.destroy){System.out.println(iloveyou);}
Ⅳ 求一个C语言表白程序
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#define I 20
#define R 340
#include <string.h>
int main()
{
char answer[10];
printf("遇到你 我才发现 曾经所有的条件 似乎都成了我等你的借口 ");
printf("我对你的感情已经决堤 所以 请允许我,从今往后映入你 明媚的眼 ");
printf("我 想和你 耳鬓厮磨,相濡以沫!");
printf("答应我吧! 输入yes,你可以看到我的真心 ");
scanf("%s", answer);
float y, x, z, f;
for (y = 1.5f; y > -1.5f; y -= 0.1f)
{
for (x = -1.5f; x < 1.5f; x += 0.05f)
{
z = x * x + y * y - 1;
f = z * z*z - x * x*y*y*y;
putchar(f <= 0.0f ? "*********"[(int)(f*-8.0f)] : ' ');
}
putchar(' ');
}
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;
}
运行效果:
(5)c语言示爱程序扩展阅读:
printf函数使用注意事项
1、域宽
%d:按整型数据的实际长度输出。
如果想输出指定宽度可以指定域宽,%md--&gt;m域宽,打印出来以后,在控制台上,显示m位;
如果我们要打印的数的位数如果超过我们设定m则原样输出;
如果我们要打印的数的位数如果小于我们设定的位数,则补空白,具体如下:
如果m为正数,则左对齐(左侧补空白);
如果m为负数,则右对齐(右侧补空白)。
2、转义字符
如果想输出字符"%",则应该在“格式控制”字符串中用连续两个%表示。
如:printf("%f%%",1.0/3);输出结果:0.333333%。
Ⅵ 怎么用C语言编写一个表白程序要求(在输入时先提示“我喜欢谁请输入她的名字”然后输入一个名字如果错误
intmain()
{
char*lovername="lucy";
charname[128]={0};
do
{
memset(name,0x00,sizeof(name));
printf("我喜欢谁请输入她的名字 ");
scanf("%s",name);
if(strcmp(name,lovername)==0)
{
printf("恭喜猜对 ");
break;
}
else
{
printf("你的回答错误请重新输入");
}
}
while(1);
return0;
}
Ⅶ 如何用c程序编写某某我爱你
#include <stdio.h>
#include <string.h>
int main()
{
char name[16];
int i;
printf("请输入一个你现在心里想的人的名字 "); //可改,可删
gets(name);
if(strcmp(name,"张三")==0) //在这里修改名字
for(i=1;i<=520;i++)
{
printf("第%3d次:",i); //不需要可以删掉
printf("我爱你1314 "); /*本来这两句printf是可以写成一句的,为了方便你删除,所以把上面的那句提出去了*/
}
else
printf(" 你是sb ");
return 0;
}
c程序总结
C语言既有高级语言的特点,又具有汇编语言的特点;既是一个成功的系统设计语言,又是一个实用的程序设计语言;既能用来编写不依赖计算机硬件的应用程序,又能用来编写各种系统程序;是一种受欢迎、应用广泛的程序设计语言。
C语言也有自身的不足,比如:C语言的语法限制不太严格,对变量的类型约束不严格,影响程序的安全性,对数组下标越界不作检查等。从应用的角度,C语言比其他高级语言较难掌握。
以上内容参考: 网络-c程序
Ⅷ 求一个用于表白的C语言或C++的程序,谢谢大家了
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#define I 20
#define R 340
#include <string.h>
int main()
{
char answer[10];
printf("遇到你 我才发现 曾经所有的条件 似乎都成了我等你的借口 ");
printf("我对你的感情已经决堤 所以 请允许我,从今往后映入你 明媚的眼 ");
printf("我 想和你 耳鬓厮磨,相濡以沫!");
printf("答应我吧! 输入yes,你可以看到我的真心 ");
scanf("%s", answer);
float y, x, z, f;
for (y = 1.5f; y > -1.5f; y -= 0.1f)
{
for (x = -1.5f; x < 1.5f; x += 0.05f)
{
z = x * x + y * y - 1;
f = z * z*z - x * x*y*y*y;
putchar(f <= 0.0f ? "*********"[(int)(f*-8.0f)] : ' ');
}
putchar(' ');
}
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;
}
运行效果:
(8)c语言示爱程序扩展阅读:
printf函数使用注意事项
1、域宽
%d:按整型数据的实际长度输出。
如果想输出指定宽度可以指定域宽,%md--&gt;m域宽,打印出来以后,在控制台上,显示m位;
如果我们要打印的数的位数如果超过我们设定m则原样输出;
如果我们要打印的数的位数如果小于我们设定的位数,则补空白,具体如下:
如果m为正数,则左对齐(左侧补空白);
如果m为负数,则右对齐(右侧补空白)。
2、转义字符
如果想输出字符"%",则应该在“格式控制”字符串中用连续两个%表示。
如:printf("%f%%",1.0/3);输出结果:0.333333%。
Ⅸ 表白用的c语言程序代码
40 # defines optimist 100 usingnamespacestd; sentence is too long,please supply a shorter sentence,
Ⅹ c语言代码表白爱心怎么运行
你好,你下载一个编译器,把代码粘贴进去,编辑一下,点运行即可.
推荐dev-C++编译器
效果如下: