C 语言实例 - 输出整数

C 语言教程 · 2019-02-20 13:27:57

使用 printf()%d 格式化输出整数。

实例

#include <stdio.h> int main() { int number; // printf() 输出字符串 printf("输入一个整数: "); // scanf() 格式化输入 scanf("%d", &number); // printf() 显示格式化输入 printf("你输入的整数是: %d", number); return 0; }

输出结果:

输入一个整数: 45
你输入的整数是: 45

点击查看所有 C 语言教程 文章: https://codercto.com/courses/l/17.html

查看所有标签

Chinese Authoritarianism in the Information Age

Chinese Authoritarianism in the Information Age

Routledge / 2018-2-13 / GBP 115.00

This book examines information and public opinion control by the authoritarian state in response to popular access to information and upgraded political communication channels among the citizens in co......一起来看看 《Chinese Authoritarianism in the Information Age》 这本书的介绍吧!

HEX CMYK 转换工具
HEX CMYK 转换工具

HEX CMYK 互转工具

HSV CMYK 转换工具
HSV CMYK 转换工具

HSV CMYK互换工具