You are not logged in. Please login at www.codechef.com 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

1★manavsethi1234
1
accept rate: 0%


Try math.h

Or cmath.h

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

link

answered 26 Aug '17, 10:36

markyl's gravatar image

1★markyl
554
accept rate: 11%

toggle preview
Preview

Follow this question

By Email:

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

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "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:

×591
×1

question asked: 26 Aug '17, 10:34

question was seen: 151 times

last updated: 26 Aug '17, 11:02