C语言小白
又是我,系统问我Unicode里没有中文,结果我用英语还是不行#include"stdio.h"
int main()
{
int a, b, m, n;
char dd = "wo", bb = "Love(●ˇ∀ˇ●)~", mam = "you";
scanf_s("%d %d", &a, &b);
printf("%d\n", a+b);
printf("Hello World\n");
scanf_s("%d %d", &a, &b);
printf("%d %d\n", &a, a + b);
printf("%c%c%c\n", &dd, &bb, &mam);
return 0;
}
5 6
11
Hello World
5 6
11859720 11
巯?
#include"stdio.h"
int main()
{
int a, b, m, n;
char dd = "wo", bb = "Love", mam = "you";
scanf_s("%d %d", &a, &b);
printf("%d\n", a+b);
printf("Hello World\n");
scanf_s("%d %d", &a, &b);
printf("%d %d\n", &a, a + b);
printf("%c%c%c\n", &dd, &bb, &mam);
return 0;
}
5 6
11
Hello World
5 6
10484600 11
K?3 我不是回答过你嘛?
打印的时候,不要加&!(除非你想打印地址) printf("%c%c%c\n", dd, bb, mam);
5 6
11
Hello World
5 6
8189952 11
0燔
还是不行 TToenn 发表于 2020-4-9 14:44
还是不行
1,如果想对我说,请回复我,不然我看不见
2,打印字符串不是用%s,和字符数组吗?
#include"stdio.h"
int main()
{
int a, b, m, n;
char dd[] = "wo", bb[] = "Love", mam[] = "you";
scanf_s("%d %d", &a, &b);
printf("%d\n", a+b);
printf("Hello World\n");
scanf_s("%d %d", &a, &b);
printf("%d %d\n", a, a + b);
printf("%s%s%s\n", dd, bb, mam);
return 0;
} qiuyouzhi 发表于 2020-4-9 14:44
我不是回答过你嘛?
打印的时候,不要加&!(除非你想打印地址)
还是不行
int a, b, m, n;
char dd = 'I', bb = 'Love', mam = 'You';
scanf_s("%d %d", &a, &b);
printf("%d\n", a+b);
printf("Hello World\n");
scanf_s("%d %d", &a, &b);
printf("%d %d\n", &a, a + b);
printf("%c%c%c\n", dd, bb, mam);
return 0;
Ieu qiuyouzhi 发表于 2020-4-9 14:47
1,如果想对我说,请回复我,不然我看不见
2,打印字符串不是用%s,和字符数组吗?
哦,抱歉,没发现
页:
[1]