Gross Caloritic Value (GCV) formula using C++

# Code for Calculating GCV using C++ :-



 #include <iostream>
#include <cmath>
using namespace std ;
int main (){
             float W , w , t2 ,t1 , tc , ta , tf , tt , x ;
             cout << "I've created GCV FORMULA USING C++:"                          << endl ;
             cout << "w :"; 
                cin >> W ;cout << endl ;
            cout << "w:";
                cin >> w ;   cout << endl ;
             float a = W+w ;
             cout <<"W+w :" << a <<endl;
             cout << "t2:" ;
             cin >> t2 ;
             cout << endl ;
             cout << "t1 :";
             cin >> t1 ;
              cout << endl ;
              float b = t2-t1;
              cout << "t2-t1 :"<< b << endl ;
              cout << " tc :"; 
              cin >> tc ;
              float c = b+tc;
              cout <<"t2-t1+tc:" <<c << endl ; 
              float d = a*c ;
              cout << "(W+w)(t2-t1+tc):" << d << endl ;
              cout << "ta:";cin >>ta ;
              cout << "tf:";cin >>tf ;
              cout << "tt:";cin >>tt ;
              float e = ta+tf+tt ;
              cout <<"ta+tf+tt :" << e << endl;
              float f = d-e;
              cout << "(W+w)(t2-t1+tc)-(ta+tf+tt):" << f << endl; 
              cout << " x :" ; cin >> x ;
              float g = f/x ;
     cout << "the value of GCV IS :((W+w)(t2-t1+tc)-(ta+tf+tt))/X :" <<g << endl ;          
                return 0 ;   
          }

* Output Result :-





  • This'll be your output:-



GCV Output



  • See below video to know how code works and get you final output:-








Comments

Popular posts from this blog

To do addition of all the Elements of Array in C++

A program to Search element in array , and if repeated so at which location it is present and how many time the number is repeated

Take n no. Of elements and arrange them in Ascending & Descending Order