It then searches for the value of "pi" which has been defined as a macros. you will learn from the very basic and these videos covers most of the basic concepts of Fortran 90 programming language. Then it takes in the input for the radius and goes to the calculation part. hello friends welcome to LEARNINDIA360 This course is designed for beginners and students of msc. Then two 4(assuming 32/64-bit system) bits memory space are created for the two float variable. In the above program the compiler first compiling from the main function (here int main()). #define pi 3.14 //macros where the value of pi is definedĪreaOfCircle = pi * radius * radius //Calculating the area of the circleĬout<<"Area of the circle\n"<<areaOfCircle<<endl Ī macros is defined in the above program ( #define pi 3.14). Macros are defined so that the program run faster and is very efficient while doing competitive programming. Given below is the C code where we take radius of the circle as an input and the area of the circle is given as the output.
0 Comments
Leave a Reply. |