c语言输入scanf
Here, we have to declare an unsigned integer variable and read its value using scanf() function in C.
在这里,我们必须声明一个无符号整数变量,并使用C语言中的scanf()函数读取其值。
The data type to declare an unsigned integer is: unsigned int and the format specifier that is used with scanf() and print() for unsigned int type of variable is "%u".
声明无符号整数的数据类型为: unsigned int ,与scanf()和print()一起用于变量的无符号int类型的格式说明符为“%u” 。
Program:
程序:
#include <stdio.h>
int main(void)
{
unsigned int value;
printf("Enter an unsigned int value: ");
scanf("%u", &value);
printf("valu