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 ;
}
#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 ;
}
Comments