SegFault after scanf?

后端 未结 4 558
南笙
南笙 2020-11-28 17:04
#include 
#define TimeConverter 60
#define TempFormula time * time * 4 / time + 2 - 20

double HoursMinToTime(int hour, int min);

double Temperature(         


        
4条回答
  •  天涯浪人
    2020-11-28 17:14

    scanf requires the addresses of the variables to be passed to it. Replace your scanf by

    scanf("%d %d",&hour,&min);
    

    You should be good to go.

提交回复
热议问题