#include <iostream>
using namespace std;
int main(){
 int time=1;
 int s;
 int speed;
 s=200;
 speed=s/time;

 cout << "주파 시간은?";
   cin  >> time;
   if(speed>=100)
    cout<< "당신은 평균속도:"<< speed << "km/h로 과속했습니다."<<endl;
   else if(time=0)
     cout<< "시간으로 0을 입력할수 없습니다"<<endl;
   else
  cout<< "당신은 평균속도:"<< speed << "km/h로 과속하지않았습니다."<<endl;
 
   return 0;
}

이거실행하면 숫자입력하면 프로그램이 바로 꺼져버리는데 왜그러는거죠??