Home Basic Loop Array string Function Pointer Contact STUDY

AHF    C    PROGRAM    SOLVING

Programming tips

" ; " after loop



Iterative statement



Specifer



Header file



Test expression




Calculate area and circumference of circle



// AHF C PROGRAM SOLVING

//solving here basic type of programming problem

#include<stdio.h> #include<math.h> #define pf printf int main() { float a; double Area,circumference; pf("Enter the radius of the circle: "); scanf("%f",&a); Area=3.14*a*a; circumference=2*3.14*a; pf("\nThe area of the circle = %.2Le",Area); pf("\nThe circumference of the circle = %.2e",circumference); return (0); }
OUTPUT:


© 2018 - All rights reserved