-->
当前位置:首页 > 题库 > 正文内容

PROGRAMMING:Output of different types of constants

Luz3年前 (2021-05-10)题库277
Please input the procedure of textbook case 02-01-03
```
#include
int main(){
//% O and% x represent octal and hexadecimal integer data, respectively, # represents output leading 0 or 0x
printf("%d,%o,%#o,%x,%#X\n",34,34,34,34);
//% lf represents real data, with 6 decimal places by default
printf("%lf,%lf\n", 3.1415926,3141.5926E-3);
//% C represents character data number, which is also integer data
printf("%c,%d\n",'A','A');
//% s represents a string
Printf ("green waters and green mountains are golden mountains and silver mountains");
Printf ("% s", "ice and snow are also golden mountains and silver mountains");
return 0;
}
```
###Input example:
```in
```
###Output example:
```out
34,42,042,22,0X22
3.141593,3.141593
A,65
Lucid waters and lush mountains are invaluable assets.
Ice and snow is also a golden mountain and a silver mountain
```







answer:If there is no answer, please comment

发表评论

访客

◎欢迎参与讨论,请在这里发表您的看法和观点。