格式化输出(常量练习)

来源:互联网 发布:mac电池循环次数 cmd r 编辑:程序博客网 时间:2024/05/16 01:25

Description
用C语言的printf( )函数输出下列内容:

100 ———— 一个整数

A ———— 一个字符

3.140000 ———— 输出一个浮点数及小数点后6位。

请使用格式控制符,如 %d %c %f 等,否则判为cheat,且封号一周。

Input
本题没有输入数据

Output
输出三行数据:

100

A

3.140000

Sample Input
(本题没有输入数据)

Sample Output
100
A
3.140000

#include <stdio.h>int main(void){   int a=100;   char b='A';   float c=3.140000;   printf("%d\n%c\n%f\n",a,b,c);   return 0;}
阅读全文
0 0