Program to calculate average of 3 numbers


     # include <iostream.h>
     int main( )
     {
                 int a, b, c, average;
                 a = 3;
        b = 7;
                 c = 2 ;
                 average = ( a + b + c ) / 3;
                 cout <<"Average  : " <<average;
        return 0;
      }

0 comments:

Post a Comment

 
 
 
 


Copyright © 2012 http://codeprecisely.blogspot.com. All rights reserved |Term of Use and Policies|