boger—伯格

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

2022年4月16日

摘要: 作业题:输入两个整数(12和37),从键盘输入‘A’和‘a’时,输出两个数中的较大数;从键盘输入‘B’和‘b’时,输出两个数中的较小数。 int a; char c; scanf("%d",&a); c = getchar(); 我的想法是从键盘输入一个int 赋值给a,然后输入一个char 赋值给 阅读全文
posted @ 2022-04-16 12:46 boger—伯格 阅读(56) 评论(0) 推荐(0)

摘要: LINUX下编译C程序时,出现了:warning: the `gets' function is dangerous and should not be used. 原因:Linux 下gcc编译器不支持gets()这个函数,解决办法是使用 fgets fgets()函数的基本用法为: fgets( 阅读全文
posted @ 2022-04-16 12:32 boger—伯格 阅读(289) 评论(0) 推荐(0)