本文目錄一覽:
C語言中怎麼弄輸入一個人的名字然後輸出我愛你?
#include stdio.h
#include string.h
int main()
{
char name[16];
int i;
printf(“請輸入一個你現在心裡想的人的名字\n\n”); //可改,可刪
gets(name);
if(strcmp(name,”張三”)==0) //在這裡修改名字
for(i=1;i=520;i++)
{
printf(“第%3d次:”,i); //不需要可以刪掉
printf(“我愛你1314\n”); /*本來這兩句printf是可以寫成一句的,為了方便你刪除,所以把上面的那句提出去了*/
}
else
printf(“\n你是sb\n”);
return 0;
}
如何用c語言編譯出「我愛你」三個字?
#includestdio.h
int main()
{
printf(“我愛你\n”);
return 0;
}
用c語言寫我愛你用*拼出來的
#include stdio.h
int main(int argc, const char * argv[])
{
unsigned char a[4] = {230, 136, 145};
unsigned char b[4] = {231, 136, 177};
unsigned char c[4] = {228, 189, 160};
printf(“%s%s%s”, a, b, c);
return 0;
}
留下qq 不懂問我哦~642233706
原創文章,作者:GPSG,如若轉載,請註明出處:https://www.506064.com/zh-tw/n/144308.html