gpt4 book ai didi

c - C语言输出√符号

转载 作者:太空宇宙 更新时间:2023-11-04 07:14:29 24 4
gpt4 key购买 nike

每次我从 word 文档中复制一个 (√) 时,我的编译器 (DEV C++) 都会将其转换为 v

有人知道如何在 c 中显示平方根符号吗?
这是为了美观(我正在尝试显示二次公式,但 ()^1/2)不起作用。

使用 Windows 7

最佳答案

是扩展的ASCII码。请引用 Ascii & extended ascii 图表

http://www.asciitable.com/index/asciifull.gif

http://www.asciitable.com/index/extend.gif

你可以尝试这样的事情:

char chr = 251; //stores the extended ASCII of a symbol
printf("Character with an ascii code of 251: %c \n", chr);
//tries to print an ASCII symbol...

关于c - C语言输出√符号,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25993671/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com