include <iostream>using namespace std ; include <math>/ run this program using the console pauser or add your own getch, system("pause") or input loop / int main() { int n,v1,v2; cin>>n; cin>>v1; cin>>v2; int timeinelevator,timebystairs; timeinelevator=n/v1; timeinstairs=(n*sqrt(2))/v2; if (timeinelevator>timeinstairs) cout<<"stairs"; else cout<<"elevator"; return 0; } asked 26 Aug '17, 10:34

Try math.h Or cmath.h Or just include bits/stdc++.h to include everything. answered 26 Aug '17, 10:36
