You are not logged in. Please login at to post your questions!


how do i add math.h to the codechef compiler

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

manavsethi1234's gravatar image

accept rate: 0%

Try math.h

Or cmath.h

Or just include bits/stdc++.h to include everything.


answered 26 Aug '17, 10:36

markyl's gravatar image

accept rate: 11%

toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported
  • mathemetical formulas in Latex between $ symbol

Question tags:


question asked: 26 Aug '17, 10:34

question was seen: 191 times

last updated: 26 Aug '17, 11:02