Write a program that take three number from user (a,b,c) . if third number ( c ) is greater then first number ( a ) then display the Square of second number ( b ).
Write a program that take three number from user (a,b,c) . if third number ( c ) is greater then first number ( a ) then display the Square of second number ( b ).
#include<stdio.h>
main()
{
int a,b,c;
printf("enter three numbers");
scanf("%d%d%d",&a,&b,&c);
if(c>a)
{
printf("c is greater than a");
printf(" the square is %d",b*b);
}
else
{
printf(" you enter an invalid number");
}
}
Comments
Post a Comment