70,022
社区成员




#include <stdio.h>
#include <math.h>
#include <locale.h>
int main(void)
{
float x, y, z, f;
setlocale(LC_ALL, "chs");
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;
//putwchar(f <= 0.0f ? L".:-=*#%@"[(int)(f * -8.0f)] : L'8'); //有些平台上不显示
f <= 0.0f ? wprintf(L"%c", L".:-=*#%中"[(int)(f * -8.0f)]) : wprintf(L"%c", L'8');
}
putchar('\n');
}
//getchar();
return 0;
}
#include <stdio.h>
#include <stdlib.h>
#include <locale.h>
#include <wchar.h>
void main()
{
setlocale(LC_ALL, "");
wprintf(L"Why? 为什么?\n");
}
给一个简单范例,这块深入学习需要了解Unicode,Encoding等概念,还是比较麻烦的。