C Programming Language Tutorial – Lecture 10 math.h library

This tutorial explains various functions in math.h library and the difference between floor and ceil function in C.

Lecture 9 Gets and Puts

C Playlist

//Source Code:

#include<stdio.h>

#include<math.h>

int main(){

printf("Floor of 8.91 is: %lf\n",floor(8.91));
//floor(x) - Return largest integer smaller than x

printf("Ceil of 8.91 is: %lf",ceil(8.91));
//ceil(x) - Return smallest integer greater than x

return 0;

}

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s