main()
{
int a, b, c, d;
float ratio;
printf("Enter four integer values\n");
scanf("%d %d %d %d", &a, &b, &c, &d);
if (c-d != 0) /* Execute statement block */
{
ratio = (float)(a+b)/(float)(c-d);
printf("Ratio = %f\n", ratio);
}
}
Output
Enter four integer values
12 23 34 45
Ratio = -3.181818
Enter four integer values
12 23 34 34