miércoles, 29 de junio de 2016

Area of Rectangle


The following program calculates the area of ​​a rectangle in C

#include<conio.h> #include<stdio.h> main() { int w,h,a; //code compatible with dev -c ++ //Capture input variables printf("Area of the rectagle\n"); printf("\n Enter the width of the rectangle=>"); scanf("%d",&w); printf("\n Enter the height of the rectangle=>"); scanf("%d",&h); //calculate the area of rectangle a=w*h; //print variables printf("\n\n Area=%d",a); getch(); }



best regards

No hay comentarios:

Publicar un comentario