if statement: If the side is less than or equal to 0, no calculation; otherwise, calculate the area of a square

#include<stdio.h>
void main()
{
float a;
printf("Input the value:");
scanf("%f",&a);
if(a>0)
printf("area=%f\n", a*a);
}

Guess you like

Origin www.cnblogs.com/zhangdemingQ/p/12050890.html