c语言中input的使用方法
一、input()函数输入机制与强制转换 input()函数返回的数据类型均为string型,常结合强制数据转换函数使用 n = int(input()) 二、input()函数的提示项 input()函数括号内可直接加提示项,类似于内置了print()函数(实际为prompt语言),但若提示项内有变量名,则要通过强制转换str()进行表达 ##提示项 name = input("请输入姓名:") ##提示项中有变量1 n = 45 name = input("...