C - Write program to remove the braces from single line if statement

Requirements

Write program to remove the braces from single line if statement

Hint

When only one statement belongs to an if statement, the braces are optional.

Demo

#include <stdio.h>

int main()//from  w w w .  j a  va 2  s .  c  om
{
    int a,b;

    a = 6;
    b = a - 2;

    if( a > b)
        printf("%d is greater than %d\n",a,b);
    return(0);
}

Result

Related Exercise