Home Basic Loop Array string Function Pointer Contact STUDY

AHF    C    PROGRAM    SOLVING

Programming tips

Header file



Comment



Working with switch case



Test expression



Iterative statement




Calculate area of a rectangle



// AHF C PROGRAM SOLVING

//solving here basic type of programming problem

#include<stdio.h> #include<math.h> #define pf printf int main() { float a,b,res=0.0; pf("Enter the height: "); scanf("%f",&a); pf("\nEnter the width: "); scanf("%f",&b); res=a*b; pf("\nThe area of the rectangle is = %f",res); return 0; }
OUTPUT:


© 2018 - All rights reserved