title: Why s is returning 0 when inputs are 2,3,4?
body: <pre><code>#include&lt;stdio.h&gt;
  #include&lt;conio.h&gt;
  
  void main(){
    int a,b,c;
    float s,area;
  
    printf("Enter 3 sides of triangle:");
    scanf("%d %d %d",&amp;a,&amp;b,&amp;c);
  
    s=(a+b+c)/2;
    printf("%d",s);
  
    area=sqrt(s*(s-a)*(s-b)*(s-c));
    printf("Area of triangle is : %.1f",area);
  }
  </code></pre>
  
  <p>and also explain bitwise complement operator why ~0 is -1? How it works?</p>