giis ext3 ext4 undelete tool

Home
User Guide
DB Recovery
Download
Documents
FAQ
Books
About Me
C Programs
Stats

/* 
   Program# 2 
   date : 10-12-2008
   Area of circle
*/

#include <stdio.h>
main(){
float r,p,c;
r=5.0;
p=3.14;
c=p*r*r;        
printf("\nArea of circle : %.1f\n",c);
}


output:
Area of circle : 78.5


Things to note:

In this program,area of circle is calculated using the given values.There are two multiplication operators found in a single expression, they are evaluated from left to right, that is first (p*r) is evaluated and the result is multiplied again with r,which is to say p*r*r is evalauted as (p*r)*r.Remember ( ) has highest precedence.The hierarchy of commonly used operators is shown below.

Priority Operators Description
1st * / % multiplication,division,modular division
2nd + - addition, subtraction
3rd = assignment
Comments
blog comments powered by Disqus

Powered by
Open Source Programmers